I’m trying to set up a cross-datacenter replication topology. I was looking at Percona for its multi-node capabilities. I’m trying to see if I can set up two independent clusters, one in each data center, and then pick one node from each and set up master/master replication.
In the FAQ on the Percona home page, there is some indication that this would work:
Q: Does it work with regular MySQL replication?
A: Yes. On the node you are going to use as master, you should enable log-bin and log-slave-update options.
I’m guessing the intent of that question was to use one node as a master to send a standard MySQL replication stream to a slave. But I want to take it a step further.
I’ve set up the two independent clusters, and then I set up standard mysql master/master replication between node 1 in DC1 and node 1 in DC2. The MySQL slave threads are up and running no problem.
When I insert a row into any node in the DC1 cluster, the row shows up on all nodes in DC1. Then the mysql replication pushes that row to node 1 in DC2. But that’s where it stops! The row doesnt make it to nodes 2,3,4 in DC2. It seems that the insert statement by the MySQL slave thread is ignored by the underlying XtraDB cluster mechanism (which I’m assuming is Galera). It’s almost like the Galera-equivalent parameter of “log-slave-enabled” is not turned on.
So how do I get this to work? Is there some wsrep setting that will allow the XtraDB cluster components to recognize the incoming transaction from the MySQL slave thread and apply that to all other nodes in that cluster?
(To anticipate the first question I think I will get: No I don’t want to set up one big cluster across the two DCs. The two DCs are on opposite sides of the world, and the asynchronous “eventually consistent” replication manner of MySQL is better for us than setting up synchronous commit cluster cross the WAN.)