MySQL High Availability Framework Explained – Part III: Failover Scenarios

In this three-part weblog sequence, we launched a High Availability (HA) Framework for MySQL web internet hosting in Part I, and talked about the details of MySQL semisynchronous replication in Part II. Now in Part III, we evaluation how the framework handles a number of of the required MySQL failure eventualities and recovers to verify extreme availability.

MySQL Failover Scenarios

Scenario 1 – Master MySQL Goes Down

The Corosync and Pacemaker framework detects that the grasp MySQL is not obtainable. Pacemaker demotes the grasp helpful useful resource and tries to recuperate with a restart of the MySQL service, if potential.
At this stage, due to the semisynchronous nature of the replication, all transactions devoted on the grasp have been obtained by on the very least certainly one of many slaves.
Pacemaker waits until all the obtained transactions are utilized on the slaves and lets the slaves report their promotion scores. The ranking calculation is completed in such a way that the ranking is ‘0’ if a slave is completely in sync with the grasp, and is a harmful amount in some other case.
Pacemaker picks the slave that has reported the 0 ranking and promotes that slave which now assumes the perform of grasp MySQL on which writes are allowed.
After slave promotion, the Resource Agent triggers a DNS rerouting module. The module updates the proxy DNS entry with the IP deal with …

Read More on Datafloq