V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
MySQL 5.5 Community Server
MySQL 5.6 Community Server
Percona Configuration Wizard
XtraBackup 搭建主从复制
Great Sites on MySQL
Percona
MySQL Performance Blog
Severalnines
推荐管理工具
Sequel Pro
phpMyAdmin
推荐书目
MySQL Cookbook
MySQL 相关项目
MariaDB
Drizzle
参考文档
http://mysql-python.sourceforge.net/MySQLdb.html
autoname
V2EX  ›  MySQL

环形 sql 主从同步, 3 台机子挂掉其中一台该怎么办

  •  
  •   autoname · 2020-07-24 20:09:34 +08:00 · 1095 次点击
    这是一个创建于 1343 天前的主题,其中的信息可能已经有所发展或是发生改变。

    a 是 b 的主 b 是 c 的主 c 是 a 的主

    那么随便挂掉一台,

    是不是就凉凉了。。。

    有解决方案吗。

    3 个项目都有读写需求,

    无法做主从,

    只能做主主

    1 条回复    2020-08-05 22:43:39 +08:00
    JasonLaw
        1
    JasonLaw  
       2020-08-05 22:43:39 +08:00
    在“Designing Data-Intensive Applications - CHAPTER 5 Replication - Multi-Leader Replication - Multi-Leader Replication Topologies”中,介绍了三种不同 replication topologies:1. circular topology 2. star topology 3. all-to-all topology 。

    它说“A problem with circular and star topologies is that if just one node fails, it can interrupt the flow of replication messages between other nodes, causing them to be unable to communicate until the node is fixed. The topology could be reconfigured to work around the failed node, but in most deployments such reconfiguration would have to be done manually. The fault tolerance of a more densely connected topology (such as all-to-all) is better because it allows messages to travel along different paths, avoiding a single point of failure.”,也就是说如果你继续采用 circular topology 的话,如果其中一个节点失败了,你可以重新配置 topology,你也可以选择容错性更好的 all-to-all topology 。

    当然不同的 topologies 都有各自的优缺点,具体的话,你可以看一下“Designing Data-Intensive Applications”这本书。

    顺便说一下,你这个根本不是主从同步,而是 Multi-Leader Replication 。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5330 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 08:11 · PVG 16:11 · LAX 01:11 · JFK 04:11
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.