I have multiple geographically separated data centres on a private network and would like some ideas for WAN outage tolerant open-source multi-master replication databases. I'm OK with RAM only dbs.
I need to be able to write to a common table on the local master at each data centre and have that information change in all versions of that table in all the data centres.
During a WAN outage I need to be able to continue to write to this common table at each data centre locally. When WAN connectivity resumes I need it to automatically merge all the changes together with some kind of conflict resolution.
Handling latency degregation would be an optional plus.
Is MySQL Cluster Multi-Site Clustering what I'm looking for? I find it hard to figure it out from their documentation.
I don't need an SQL interface or MySQL specifically, simple key:value would work too.
I really hope some more knowledgeable people could point me in the right direction!
Best Answer
I favor Galera clustering (see Percona's PXC or MariaDB). Put 1 node in each of 3 different datacenters. (One node could be a trivial 'arbitrator' if you need to cut corners.)
Galera requires the use of InnoDB, but that is reasonably efficient.
If a node goes down, or is separated from the other two nodes due to a network outage, the system hums along, with the restriction that you can't write to the dead/isolated node. When if comes back up (or is replaced/repaired), the cluster will repair it automagically.
If no node can talk to any other node (which seems extreme), manual intervention will be required. (Actually, if more that 50% of the nodes are communicating with each other, the "system" is still alive and usable.)
Transactions are synchronous (read: latency), but there in only one round trip per transaction.
NDB Cluster (which is perhaps what you are referring to) is a distinctly different animal. It uses an "eventual consistency" for dealing with replication. This is not at all related to the rest of MySQL replication options.
Key:value can be implemented easily on top of InnoDB or NDB cluster.