mmmf, multi-master mysql failover

Overview Limitations Algorithm Speed Download

Explained in details

You can watch me explaining the thing here: http://www.youtube.com/watch?v=Qzht1B7p0yQ

Overview

mmmf is an algorithm and a tool which turns a simple and popular mysql installation with master and several slaves replicating from it into a powerful mysql cluster with some properties of complex multi-master solutions: The important difference with the real multi-master solutions is that the time needed to recover from master failure is not zero, though it is sane for the majority of the projects (see speed section below).

Limitations

Currently the tool has the following limitations:

Algorithm

Algorithm consists of two phases: finding the Best Slave and Equalization phase. On the pictures below you see binary log of the changes going through master represented as a number line with positions of the master and slaves on it, where red X is a failed master, S — slaves. Numbers are fictional and do not mean anything special.

Phase 1. Finding the Best Slave.

Phase 2. Equalization.

Speed

Algorithm speed depends on the number of slaves and the difference between Best Slave and other slaves. With the use of parallel synchronization the time to execute the algorithm is approximated by the time needed to synchronize the Best slave with the "worst" slave which in turn can be approximated by an average lag of all of your slaves during production work.

Download

http://search.cpan.org/~kohts/mmmf/

--
petya@kohts.ru, 2011