简体   繁体   English

对于Galera群集,建议最少设置3个节点吗?

[英]Is 3 nodes a recommended minimum for a Galera cluster?

I intend to run a Point of Sale software in a galera cluster (percona xtradb). 我打算在galera群集(percona xtradb)中运行销售点软件。 Each POS terminal would be its own cluster and then there will be an Amazon EC2 in addition to help avoid split-brain scenarios. 每个POS终端都将是其自己的集群,然后还将有一个Amazon EC2,以帮助避免出现脑裂的情况。

Is the above setup an ideal cluster setup? 以上设置是否是理想的群集设置? My POS terminals could range from 1 to N nodes within a local network and I will always only have 1 EC2 instance outside the network. 我的POS终端在本地网络中的范围可能是1到N个节点,而我在网络外部始终只有1个EC2实例。

Thanks, 谢谢,

Yes. 是。 To provide automatic failover, 3 nodes is required. 要提供自动故障转移,需要3个节点。 If you have 3 nodes in the same building, etc, then you are not safe against floods, earthquakes, tornadoes, data center failure, etc. "Within the local network" -- see what Amazon means by that, then read between the lines; 如果您在同一座建筑物等中有3个节点,那么您就无法抵御洪水,地震,龙卷风,数据中心故障等。“在本地网络内”-了解Amazon的意思,然后在两行之间阅读; it may or may not protect you from various possible disasters. 它可能会或可能不会保护您免受各种可能的灾难的影响。

Do not plan on having "too many" nodes in the cluster -- all writes go to all other nodes; 不要计划在群集中有“太多”的节点-所有写操作都转到所有其他节点; this can add up to a lot of network traffic. 这可能会增加大量网络流量。 (I have not heard of more than something like a dozen nodes. But I don't know what the practical limit is.) (我只听说过十几个节点。但是我不知道实际的限制是多少。)

You could have multiple clusters and have data replicated off-cluster to some central server for reporting, etc. That replication would be ordinary MySQL replication, not the Galera type. 您可能有多个集群,并且已将数据集集群外复制到某个中央服务器以进行报告等。该复制将是普通的MySQL复制,而不是Galera类型。

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

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