MySQL replication setups are inevitably related to failovers.
Unlike multi-master clusters like Galera, there is one single
writer in a whole setup - the master. If the master fails, one of
the slaves will have to take its role through the process of
failover. Such process is tricky and potentially, it may cause
data loss. It may happen, for example, if a slave is not up to
date while it is promoted. The master may also die before it is
able to transfer all binlog events to at least one of its slaves.
Different people have different takes on how to perform failover.
It depends on personal preferences but also on requirements of
the business. There are two main options - automated failover or
manual failover.
Automated failover comes in very handy if you want your
environment to run 24x7, and to recover quickly from any
failures. Unfortunately, this may come at a cost - in more
complex failure scenarios, automated failover may not …
[Read more]