# Async replication between 2 XtraDB clusters.

**URL:** <https://forums.percona.com/t/async-replication-between-2-xtradb-clusters/3486>\
**Category:** Percona XtraDB Cluster 5.x\
**Created:** [May 19, 2014, 2:14pm UTC](https://forums.percona.com/t/async-replication-between-2-xtradb-clusters/3486 "2014-05-19T14:14:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![llintes](https://avatars.discourse-cdn.com/v4/letter/l/eada6e/32.png) [@llintes](https://forums.percona.com/u/llintes)\
**Post date:** [May 19, 2014, 2:14pm UTC](https://forums.percona.com/t/async-replication-between-2-xtradb-clusters/3486/1 "2014-05-19T14:14:29Z")

</div>

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.

1. 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
