简体   繁体   中英

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).

Is this true? And will I have any issues having 8 nodes in my cluster?

No, 8 is OK. The "quorum" mechanism needs a majority. If you have at least 3 nodes (and only one fails), the remaining nodes can establish a quorum.

If your 8 nodes are split with 4 in each of two datacenters, then a datacenter outage would kill the entire cluster. To protect against datacenter failure, you should spread the nodes 'evenly' across 3 (or more) datacenters. For 8 nodes: 3+3+2 is the only safe split. 4+3+1 or 4+2+2 would kill the cluster if the '4' datacenter went down.

How well is the 8-node cluster working? (That's the biggest one I have heard of.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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