How to accept newly joined node which is not in the initial cluster list without restarting cluster?

79 views
Skip to first unread message

Orion Naga

unread,
Apr 21, 2016, 12:28:15 PM4/21/16
to raft-dev
Hi all,
I would try to test a scenario: The initial cluster has 3 nodes, named A, B, C. Now after the system growing, we need to add new node, called D, into the cluster. D is not listed in the config file at the initial time. How the running nodes (A,B,C) recognize the newly node which want to join?
My idea is using cluster name to isolate cluster. For example, any node send the first Request vote with the cluster name. If the cluster name from request matches the configured file, continue to process election process, otherwise drop. This allows multiple clusters run under the same subnet.
But this lead to another issue: How to ensure the majority, since we do not have the fixed number of nodes.
Please give your comment about this case?
Thank,
Orion.

Archie Cobbs

unread,
Apr 21, 2016, 12:36:22 PM4/21/16
to raft-dev
On Thursday, April 21, 2016 at 11:28:15 AM UTC-5, Orion Naga wrote:
I would try to test a scenario: The initial cluster has 3 nodes, named A, B, C. Now after the system growing, we need to add new node, called D, into the cluster. D is not listed in the config file at the initial time. How the running nodes (A,B,C) recognize the newly node which want to join?
My idea is using cluster name to isolate cluster. For example, any node send the first Request vote with the cluster name. If the cluster name from request matches the configured file, continue to process election process, otherwise drop. This allows multiple clusters run under the same subnet.

Many implementations include a "cluster ID" in all messages to (a) allow parallel clusters and (b) prevent accidental mixing of raft nodes from different cluster.

Discussed here for example.

One detail: no need to manually configure cluster ID's. Just choose one randomly, when the first "add" happens on the first node (which must be uninitialized) to add itself, creating a new one-node cluster.
 
But this lead to another issue: How to ensure the majority, since we do not have the fixed number of nodes.
Please give your comment about this case?

Not sure what you're asking. Follow the process in the Raft paper to add new nodes and everything should work.

If you're using cluster ID's, you want uninitialized nodes to accept and record the cluster ID of the first message they receive, and make it their own cluster ID. Otherwise, once a node has a cluster ID set, it ignores any messages containing other cluster IDs.

-Archie
 
Reply all
Reply to author
Forward
0 new messages