# Bi-directional replication between 2 XtraDB clusters

**URL:** <https://forums.percona.com/t/bi-directional-replication-between-2-xtradb-clusters/5661>\
**Category:** Percona XtraDB Cluster 5.x\
**Created:** [June 6, 2017, 8:46am UTC](https://forums.percona.com/t/bi-directional-replication-between-2-xtradb-clusters/5661 "2017-06-06T08:46:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Timur\_Solodovnikov](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@Timur\_Solodovnikov](https://forums.percona.com/u/Timur_Solodovnikov)\
**Post date:** [June 6, 2017, 8:46am UTC](https://forums.percona.com/t/bi-directional-replication-between-2-xtradb-clusters/5661/1 "2017-06-06T08:46:24Z")

</div>

Good morning, does anyone use in production scheme below:

ClusterA(3 nodes) \<-Native MySQL replication-\>ClusterB(3 nodes).

As I understand slave process will be started on some node in cluster and in case if node goes down we can use auto-position to start slave on other node in cluster without any problems. Basically I would like to use such scheme to replicate data between datacenters.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![przemek](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/przemek/32/3_2.png) [@przemek](https://forums.percona.com/u/przemek)\
**Post date:** [June 25, 2017, 3:49pm UTC](https://forums.percona.com/t/bi-directional-replication-between-2-xtradb-clusters/5661/2 "2017-06-25T15:49:14Z")

</div>

Hi,  
That’s of course possible, but many problems to be expected I am afraid. The first one is that you are simply implementing async master\<-\>master topology here, and if it happens that writes go to both clusters at a same time, data may go out of sync. On top of that is that when MySQL’s GTID is used, in some cases nodes may end up with inconsistent sequences making changing async masters impossible - look for bugs related to GTID and PXC/Galera.  
If possible, I’d consider using Galera homogenous system. If WAN link is too slow/unstable though, I’d be very careful and set the second cluster as stand-by/read only.
