akkaakka-cluster

How does discrepancy of seed-nodes configuration affect cluster formation?


Suppose nodes A, B, C, and D are clustered by the following configuration,

cluster {
    seed-nodes = ["A", "B", "C", "D"]
}

and nodes C and D with the addition of nodes E, F, and G are soon to be deployed under the following configuration:

cluster {
    seed-nodes = ["C", "D", "E", "F", "G"]
}

In this case, would the order of deployment affects the cluster formation? In other words, would the two scenarios below result in the same cluster:

As per the Akka documentation, the first node in seed-nodes plays a special role in cluster formation:

but the node configured as the first element in the seed-nodes list must be started when initially starting a cluster. If it is not, the other seed-nodes will not become initialized, and no other node can join the cluster.

Since node C in the latter case starts with no nodes D, E, F, and G belong to a cluster, it should create a new cluster. But, in the former case, before C and D are re-deployed, nodes E, F, and G joins the existing cluster via C and D, and the re-deployment C and D would not change anything since there's some nodes already belong to a cluster. Am I right?


Solution

  • Maybe, depending on how you "redeploy". But let me step through it in detail, as I had to read your question multiple times to (I think) understand what you are asking. Then I'll make some general recommendations.

    Essentially you have two configurations: one with [A,B,C,D] as seed nodes and another with [C,D,E,F,G] as seed nodes. I'll refer to these as config 1 and config 2. You then have two scenarios where you are starting and stopping and reconfiguring the nodes in various orders. But I wasn't exactly sure about one of your steps so I actually define scenario 1, scenario 2a, and scenario 2b.:

    As you point out, the first node in the seeds has the unique ability to start a new cluster. So if we walk through scenario 1:

    Scenario 2a:

    Scenario 2b:

    Several comments about this: