During the design period of a new cluster, it is always advised
to have at least 3 nodes (this is the case with PXC but it’s also
the same with PRM). But why and what are the risks ?
The goal of having more than 2 nodes, in fact an odd number is
recommended in that kind of clusters, is to avoid split-brain
situation. This can occur when quorum (that can be simplified as
“majority vote”) is not honoured. A split-brain is a state in
which the nodes lose contact with one another and then both try
to take control of shared resources or provide simultaneously the
cluster service.
On PRM the problem is obvious, both nodes will try to run the
master and slave IPS and will accept writes. But what could
happen with Galera replication on PXC ?
Ok first let’s have a look with a standard PXC setup (no special
galera options), 2 nodes:
two running nodes (percona1 and percona2), communication between
nodes is ok
…
[Read more]