Adding a new node to a Galera Replication cluster
Adding a new node is automatic with Galera. It follows the same process as recovering a failed node. When the node is introduced, ClusterControl™ will select a ‘donor’ and do a full state snapshot transfer from that node.
During the synchronization process, any incoming transactions are cached in a slave queue. Once the node is SYNCED, it is ready to accept client connections.
-
@Mark,
Short answer:
- A node connects to one of the cluster members, membership protocol is initiated, after which node is connected to all members of the cluster
- The node receives cluster state ID (global transaction ID of the last committed transaction) and compares with its own
- If it is different, it sends state transfer request to cluster. Cluster chooses one of the members as a state transfer donor. Donor connects to the new node (that's an important difference from established practice) and transfers the state. There are several ways it can happen. While state transfer is happening the joining node is queueing replication events arriving from the cluster.
- The node sends JOIN message and is considered a full-fledged member. It then starts to apply replication events.
- When the replication events queue goes down to 0, the node becomes SYNCED and is allowed to process client queries.
Long answer:
http://www.codership.com/wiki/doku.php?id=info#adding_another_node_to_a_cluster and around.
Please sign in to leave a comment.
Comments
2 comments