As an avid opensource entrepreneur I’ve been using MySQL, later MariaDB, for many years now. For scalability I’ve frequently used replication, having one master for updates and inserts, having one or more slaves for selects. For about a year now I’ve been trying to get a multi master environment to run reliably, making sure that the database is HA.
The multi master environment however seems to create a great deal of problems. I typically use HAProxy as a loadbalancer, having two frontends, one for the masters, one for the slaves. For some reason that I haven’t been able to figure out for all this times, at some point I will get desynchronized master servers which will immediately make the slave IO stop on both nodes. Depending on when I notice this (typically quite fast as Nagios/Pushover will alert me quickly but I’m not always near a computer) recovering from this situation becomes more and more difficult.
Today however I learned about Galera and decided to set up a test cluster. All I can say… what a BLESSING. MariaDB Galera Cluster is a synchronous multi-master cluster for MariaDB. I found the configuration to be a 5 minute chore and after that I’ve had absolutely zero problems.