Percona XtraDB Cluster (PXC) has become a popular option to provide high
availability for MySQL servers. However many people are still
having a hard time understanding what will happen to the cluster
when one or several nodes leave the cluster (gracefully or
ungracefully). This is what we will clarify in this post.
Nodes leaving gracefully
Let’s assume we have a 3-node cluster and all nodes have an equal
weight, which is the default.
What happens if Node1 is gracefully stopped (service mysql
stop
)? When shutting down, Node1 will instruct the other
nodes that it is leaving the cluster. We now have a 2-node
cluster and the remaining members have 2/2 = 100% of the votes.
The cluster keeps running normally.
What happens now if Node2 is gracefully stopped? Same thing,
Node3 knows that Node2 is no longer part of the …
[Read more]