MySql集群“脑裂” 解决方案?

发布于 2024-07-08 18:19:29 字数 115 浏览 9 评论 0原文

几天前,我参加了贝尔格莱德的一些 IT 会议。 议程上的主题是关于 MySql 和 MySql 中的集群,来自 MySql 的人说他们有解决集群裂脑问题的最佳解决方案,有谁知道这件事,这是真的还是只是一个营销技巧?

Before few days I was at some IT conference here in Belgrade. On Agenda was a topic about MySql, and clustering in MySql, and the guys from MySql said that they have the best solution for cluster split brain problem, does anyone know something about this, is this true or just a marketing trick?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

維他命╮ 2024-07-15 18:19:29

MySQL Cluster 至少需要 3 个系统,以允许其中一个节点作为仲裁者来处理脑裂场景。 其中两个系统可以运行数据节点/mysqld 节点,第三个系统需要运行管理节点(默认情况下通常是仲裁器,但 SQL 节点也可以作为它们运行)。

如果出现裂脑设置(即两个数据节点无法再相互通信,但它们仍在运行),那么它们将意识到这一点并要求仲裁员决定允许哪个节点继续运行。 如果节点无法与仲裁器对话,那么它将关闭。 仲裁器可以从所有可以与之通信的节点中选择一个节点继续运行并告诉其他节点关闭。

仲裁者通常是管理节点,但也可以是数据节点。 如果仲裁器发生故障,集群可以选举一个新的仲裁器。 但是,它在仲裁期间无法执行此操作,因此如果数据节点和仲裁器同时失败,则第三个节点将关闭。

当然,当您有多个节点组时,它会变得更加复杂,但相同的基本思想也适用于这些情况。

您可以在 MySQL 集群常见问题解答

MySQL Cluster requires at least 3 systems which allows it have one of the nodes be an arbitrator for dealing with split brain scenarios. Two of the systems can run data nodes/mysqld nodes and the third needs to run the management node (which is normally the arbitrator by default, however SQL nodes can also operate as them).

In the event of a split brain setup (ie. the two data nodes can no longer talk to each other, but they are still running), then they will realize it and ask the arbitrator to decide which node is allowed to continue to running. If a node can not talk to the arbitrator then it will shutdown. From all of the nodes the arbitrator can talk to it will pick a node to continue to running and tell the other(s) to shutdown.

The arbitrator is normally the management node, but can also be data nodes. If the arbitrator fails, then the cluster can elect a new one. However, it can't do this during arbitration, so if both a data node and arbitrator fail at once, the third node will shutdown.

Of course, it gets a bit more complex when you have multiple node groups, but the same basic ideas apply in those cases as well.

You can read more about this at in the MySQL Cluster FAQ.

凑诗 2024-07-15 18:19:29

这是否属实是主观的,尽管我听说mysql的集群支持很好。 然而,这个概念绝对受到其他数据库的支持和使用,例如用于 postgres 的 Slony-I。

如果您澄清您所指的最佳方面(即性能、正常运行时间、易于设置等),您可能会得到更有用的答复。

It is subjective whether or not this is true or not, although I've heard that mysql's cluster support is good. However this concept is definitely supported and in use for other db's such as Slony-I for postgres.

You may get more useful responses if you clarify what aspect of best you mean (i.e. performance, up-time, ease of setup, etc).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文