Looking at the akka cluster documentation it appears that you have to know the server & port values of at least 1 "seed node" to join the cluster. The example application.conf clearly indicates that the developer needs to know "host1" and "host2" when writing the file:
akka.cluster.seed-nodes = [
"akka.tcp://ClusterSystem@host1:2552",
"akka.tcp://ClusterSystem@host2:2552"]
But, consider the possibility of registering each cluster node with a DNS load balancer. For example: it is possible to instantiate 10 nodes that are all registered with a load balancer behind the name "foobar.cluster.com" such that the load balancer will send each new connection to one of the 10 nodes round-robin style.
Could I then set the seed-node to "akka.tcp://[email protected]:2552"?
In other words, Is it possible to use dynamic, load balancing, names to join an akka cluster?
A priori there is one potential issue: a node may get itself as the seed node on the first try. One potential solution to this issue is putting the same seed node value multiple times in the conf file to get a high probability of eventually connecting to a different node:
akka.cluster.seed-nodes = [
"akka.tcp://[email protected]:2552",
"akka.tcp://[email protected]:2552",
"akka.tcp://[email protected]:2552"]
But akka may just reduce all of those values to a single call since they are all exactly the same...
Thank you in advance for your consideration and response.