sverreg
sverreg

Reputation: 235

Can MySQL GTIDs be used in a master-master topology?

When using coordinate based replication, it was possible in MySQL to have each of two nodes replicating off the other in a master-master topology.

With the introduction of GTID's in MySQL 5.6, can this same topology be used in the same way when GTID replication is enabled?

I don't immediately see any reason why not, but I can't find any info online about it and I just don't want to discover a few weeks later a bunch of weird corruption issues.

Upvotes: 1

Views: 211

Answers (1)

Shadow
Shadow

Reputation: 34231

Mysql documentation on restrictions in replication with GTID do not mention that master - master replication is not allowed. I also found a Percona blog entry that explicitly says that this is allowed:

Q: Does GTID provide any benefit to master-master replication? If yes, how? Q: Is ACTIVE ACTIVE MASTER MASTER successful in MySQL with GTID?

A: GTIDs don’t change the nature of MySQL replication: for instance it is still asynchronous and if you write on both masters in a master-master setup, there is still no write conflict detection mechanism. The main benefit of GTIDs is that any change of the replication topology is easy because you no longer need to run complex calculations to find the right binlog positions when connecting a slave to a new master. So master-master replication can be configured with GTIDs, it does not provide a lot of benefits compared to position-based replication as you will never change the replication topology. And having a setup where both masters receive writes is still not recommended with GTIDs.

Upvotes: 1

Related Questions