MySQL Multi-master replication

ehsun7b picture ehsun7b · May 8, 2013 · Viewed 8.3k times · Source

We have some (10-) MySQL server nodes and we want them to be replicated in a way that if one goes down the rest never get affected.

I know MySQL provides Master/Slave (not good for us) and Multi-Master replication.

  1. Does MySQL Multi-Master replication work like a mesh? I mean all nodes can get updated from all other nodes?
  2. Is it true that even in Multi-Master replication (MySQL) each node can only get the data from one master???

So if the native MySQL replication features can not fulfill our requirement, do you know any tool that can do this? Our preference is the built-in MySql replication.

Answer

Masood Alam picture Masood Alam · May 8, 2013

The answer to your problem is simple yet very technical aswell. Traditional MYSQL tools cannot help so you need help of Galera cache from codership. Some features are synchronous replication which MYSQL do not offer, and it works as a cluster if you have a galera MYSQL cluster setup, one goes down rest keeps on going.

I personally use Percona xtradb cluster for this, percona xtradb cluster is patched version of MYSQL and galera embeded together. All servers can take reads and writes.

I have written an article on installing this but cannot post here as stack overflow may consider as link building.

DO some research on Galera, as you use normal MYSQL in a cluster environemnt, FULL HA and HS.

If you need some more info feel free to discuss it with me.

Thanks...