Is 3 nodes a recommended minimum for a Galera cluster?

1.8k Views Asked by At

I intend to run a Point of Sale software in a galera cluster (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.

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.

Thanks,

1

There are 1 best solutions below

6
On

Yes. To provide automatic failover, 3 nodes is required. 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; 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.