MySQL-MMM Multi-Master Manager
MMM (Multi-Master Replication Manager for MySQL) is a set of flexible scripts to perform monitoring/failover and management of MySQL master-slave replication configurations (with only one node writable at any).
MMM operation is based on the concept of “roles”, of which there are 2:
- reader : a server from which data can be read. There can be multiple servers with a role of “reader” at the same time;
- writer : a server to which data can be written. There is only one server with the “writer” role at any given time.
An IP address is assigned to each instance of a role, and MMM performs role migration by moving these virtual IP addresses between the servers as required upon failure.
In the configuration we are using, there is 1 reader role, and 1 writer role. The normal situation (i.e. when there is no failure) is to have both reader and writer role on the same MySQL server.
The toolset also has the ability to read balance standard master/slave configurations with any number of slaves, so you can use it to move virtual IP addresses around a group of servers depending on whether they are behind in replication.
A component of the MySQL-Multi-Master-Manager, the Monitor, is also running in “active-passive” mode (i.e. only one is running at any given time) on the application servers. Which Monitor is active is determined by standard Linux HA tools, namely Pacemaker and Corosync.