Master/slave replication is an important tool that gets used in
many ways: distributing read loads among many slaves for
performance, using a slave for backups so the master can handle
live load, geographically distributed disaster recovery, etc. The
Achilles’ Heal of slave performance is that slave workloads are
single-threaded. The master can have many clients inserting,
updating, querying, whereas the slave has only one insertion
client: the master. InnoDB single-client performance is much
slower than its multi-client performance, which means that the
bottleneck in a master/slave system is often the rate at which a
slave can keep up.
If the master has an average transactions per second (tps) that
is higher than what the slave can handle, the slave will fall
further and further behind. If the slaves are being used to
distribute read workload, for example, the results they produce
will fall further out of date. If a slave is used to …
[Read more]