简体   繁体   English

galera集群是否必须具有偶数个节点?

[英]Does the galera cluster have to have an even number of nodes?

I currently have 8 nodes in my Galera cluster, but I saw a video that suggests to have only an odd number of nodes (3,5,7,9,ect). 目前,我的Galera群集中有8个节点,但是我看到一个视频,建议仅包含奇数个节点(3、5、7、9等)。

Is this true? 这是真的? And will I have any issues having 8 nodes in my cluster? 在群集中有8个节点时,我会有任何问题吗?

No, 8 is OK. 不,8可以。 The "quorum" mechanism needs a majority. “法定”机制需要多数。 If you have at least 3 nodes (and only one fails), the remaining nodes can establish a quorum. 如果您至少有3个节点(只有一个发生故障),则其余节点可以建立仲裁。

If your 8 nodes are split with 4 in each of two datacenters, then a datacenter outage would kill the entire cluster. 如果将您的8个节点在两个数据中心中的每一个中拆分为4个,则数据中心中断将杀死整个集群。 To protect against datacenter failure, you should spread the nodes 'evenly' across 3 (or more) datacenters. 为了防止数据中心发生故障,您应该将节点“均匀”分布在3个(或更多)数据中心中。 For 8 nodes: 3+3+2 is the only safe split. 对于8个节点:3 + 3 + 2是唯一的安全分割。 4+3+1 or 4+2+2 would kill the cluster if the '4' datacenter went down. 如果“ 4”数据中心发生故障,则4 + 3 + 1或4 + 2 + 2将杀死群集。

How well is the 8-node cluster working? 8节点群集的运行状况如何? (That's the biggest one I have heard of.) (这是我所听到的最大的。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM