The previous and current week I am dealing with MySQL replication.
Currently, I have a master-slave setup, with slave operating in readonly mode.
According to MySQL manual page, replication in slave is implemented using two threads:
- Thread I/O is polling the Master for binlog updates: this thread polls master for any updates written to its binlog. If master has updates, I/O thread puts them in a queue.
- Thread SQL reads the updates queue and executes them in the slave.
This picture describes Slave I/O replication thread:
And the following one describes the operations of the Slave SQL replication thread:
The basic parameters for replication can be viewed from the MySQL manual here.