Async replication between 2 XtraDB clusters.

05-19-2014, 02:44 PM

Hi,

We have nodes A and B as part of one XtraDB cluster and nodes C and D as part of second XtraDB cluster
We are trying to setup async replication between A and C, thus replicating data between the 2 clusters. This configuration seems to be working.
How should we deal with the following scenario:
1. Node A goes down. Is there a way to automatically repoint
- Node C to replicate from Node B instead of Node A?
- Node B to replicate from Node C? Please note that async replication was never setup on nodes B and D.

2. I have also tried following configuration:

- 2 XtraDB clusters each having 2 nodes and an arbitrator. Nodes A and B for PXC1 and nodes C and D for PXC2.
# GTID related parameters are setup in config files for XtraDB clusters.
gtid-mode=on
enforce-gtid-consistency=true

- async replication between Nodes A and C but the master is not set to the host name directly. We are using instead virtual names.
For example:
- Virt_PXC1 name is pointing to Node A when node A is up and to Node B when node A is down.
- Virt_PXC2 name is pointing to Node C when node D is up and to Node D when node C is down.
This way the async replication between node A and node C is setup using Virt_PXC1 and Virt_PXC2.
Async replication is set with master_auto_position = 1.
Despite having master_auto_position = 1 this configuration is still not working.

Any input on the above 2 scenarios? How is it usually handled async replication between 2 XtraDB clusters?
Thank you,
Liviu