Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

223
Vistas
Akka Cluster Joining with DNS Load Balancing

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://ClusterSystem@foobar.cluster.com: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://ClusterSystem@foobar.cluster.com:2552",
  "akka.tcp://ClusterSystem@foobar.cluster.com:2552",
  "akka.tcp://ClusterSystem@foobar.cluster.com: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.

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

It is possible, but you have to do the DNS resolution yourself, and then join the cluster programmatically. This is somewhat described here: http://doc.akka.io/docs/akka/current/scala/cluster-usage.html#Joining_to_Seed_Nodes

So you would first need your configuration file to contain akka.cluster.seed-nodes = [] in order to disable auto joining.

Then you would need to resolve foobar.cluster.com to get a list of actual nodes i.e., 01.foobar.cluster.com, 02.foobar.cluster.com, ...

You would use those to join the cluster: Cluster(system).joinSeedNodes(_list_of_nodes_with_port).

Finally, remember that when the hostname and port pair that Akka binds to will be different than the "logical" host name and port pair that is used to connect to the system from the outside. This requires special configuration

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda