Signal of linux

Definition:

  • System calls: communication chanel between user space program and kernel
  • Signals: a different channel, used for inter-process communication
  • Signals don’t carry any agrgument, they are self explanatory by their name
  • Some signals identified by a number, ie SIGKILL (9)
  • That’s why we use kill -9 <PID> to kill a process, because the kill command will send a defined signal to a process with a given identity <PID>
  • when we run kill -9 <PID> command, that process is not terminate itself, instead we’re telling that OS to stop running the program, no matter what the program is doing


Learning logs in Aug

  1. Export large tables in MySQL
  2. Bash completion on debian 9


RDS as-a-fckin-service

AWS RDS document: Depending on the DB instance class and the amount of storage, it can take up to 20 minutes before the new instance is available.

Reality:

  • RDB instance status: creating
  • RDS stuck in this fucking step nearly 2 hours and couting
  • db-fuck-as-a-service


Mindset for building HA and scalable system

System or infrastructure must have

  • Fault tolerance
  • No single point of failure
  • More than one or two security layers
  • Auto-failover without requiring human intervention
  • Heartbeat monitoring on all running components
  • Infrastructure as code


Increase EBS volume of AWS on linux

Problem

  • A disk volume 32GB /dev/xvdf1 is mounted into /var/lib/mysql
  • This volume is out of space, need to be extend size to 64GB
  • Extended to 64GB on aws console, but from ec2 point of view, it’s just 32GB

Rootcause: didn’t merge partition after extending and resize fs