Multiple containers dns


i have got a nomad cluster with 3 server nodes and 2 client nodes.

i want to run 4 containers on these client nodes with spread algorithm and all 4 containers should have different DNS.

In ideal conditions if one of my client node stops working then all 4 containers will move to other working client node but will i be able those containers with their registered DNS?

how can i register all 4 DNS on these 2 client nodes and how can i access containers if one client node goes down.

Need help.


Hi @nirankush.tyagi94,

I think what you are looking for is a load balancer to route traffic to all the instances of your service. Look at this tutorial, where Fabio is used to route traffic to the services running on Nomad.

With this approach, you don’t have to worry about the nodes or service instances going down, as the load balancer takes care of discovering a healthy backend.

Please let me know if this works for you or if I misunderstood your requirements.