seed-nodes in singleton cluster #1539
Replies: 5 comments 1 reply
-
The docs go into detail on this. https://pekko.apache.org/docs/pekko/current/typed/cluster.html and the links from it. |
Beta Was this translation helpful? Give feedback.
-
To clarify: with "singleton cluster" you mean "A cluster with multiple nodes that I deploy a Singleton actor onto", right? I ask because the term "singleton cluster" is also sometimes used to mean "a cluster which only ever has 1 node", which it looks like you probably don't mean. If you have a manually-managed, fixed-nodes cluster, then indeed using seed nodes is a good way to let them find each other, and I think it's OK to list all addresses in the seed-nodes section. However, if you're using some dynamic deployment mechanism such as Kubernetes or AWS, instead of configuring seed-nodes explicitly you might want to use Cluster Bootstrap instead, with the Discovery mechanism that fits your environment. |
Beta Was this translation helpful? Give feedback.
-
While trying to understand the cluster behavior, I came across this scenario. Lets say, we have 3 node cluster and I have specified the seed-nodes as follows.
If I start the application from Node3 or Node2 (basically any node(s) apart from the first one specified in the list), then it waits and cannot start a cluster till Node1 (as per the example) joins and eventually initialize the cluster and after that all other nodes becomes the part of the intended cluster. Where I am bit surprised was that I thought since all nodes were listed in the seed-nodes, any Node could potentially start the cluster but that was not the case. Is this the intended behavior on startup? |
Beta Was this translation helpful? Give feedback.
-
Got my answer here "The seed nodes can be started in any order. It is not necessary to have all seed nodes running, 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. " |
Beta Was this translation helpful? Give feedback.
-
Thank you for the support.. |
Beta Was this translation helpful? Give feedback.
-
Is it recommended to add all node address in the cluster seed-nodes section? If not recommended then I am keen on knowing why, apart from the maintainability factory.
Beta Was this translation helpful? Give feedback.
All reactions