Controlled Restart of Percona Cluster Nodes in a Load-Balanced Environment

In our environment, we operate a Percona Cluster consisting of three nodes, load-balanced using HAProxy.

When restarting a node, it is essential to first make the node inaccessible to application servers. Once all active connections and traffic have ceased, the Percona server can be safely restarted.

Since HAProxy monitors node availability through the xinetd service, the simplest way to mark a node as unavailable is to stop the xinetd service before restarting MySQL. After the restart is complete, the xinetd service should be started again.

Use the following command sequence to perform a controlled restart:

service xinetd stop; sleep 60; service mysql restart; sleep 10; service xinetd start

Important: Never attempt to restart two or more nodes simultaneously. Always restart nodes one at a time, otherwise you are risking cluster instability or data inconsistency.

×