gpt4 book ai didi

mysql - MySQL GTID 可以用于主-主拓扑吗?

转载 作者:行者123 更新时间:2023-11-28 23:25:06 24 4
gpt4 key购买 nike

当使用基于坐标的复制时,在 MySQL 中可以让两个节点中的每一个在主-主拓扑中相互复制。

随着 MySQL 5.6 中 GTID 的引入,在启用 GTID 复制的情况下能否以相同的方式使用相同的拓扑?

我没有立即看到任何不这样做的原因,但我无法在网上找到任何关于它的信息,我只是不想在几周后发现一堆奇怪的腐败问题。

最佳答案

关于 restrictions in replication with GTID 的 Mysql 文档不要提及主-主复制是不允许的。我还找到了一个 Percona blog entry明确表示这是允许的:

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.

关于mysql - MySQL GTID 可以用于主-主拓扑吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39695213/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com