Getting used to swarm and really enjoy it so far. We are going to use in our production environment and I have one final hangup when it comes to DNS and the services/workers.
I have a service created called testService with 4 replicas on two different nodes.
Which when looking at docker ps gives individual service names like:
I can resolve testService, cannot resolve testService.1, but can resolve testService.1.jjfkalkdjfaiuo
But I feel I must be doing some wrong because the names have the format “serviceName.instance#.someId” when I would expect them to be in the format “serviceName.instance#”. Am I doing something wrong or am I mis-reading documentation?
I am not sure I can use this docker swarm system with overlay network if I cannot always assume my four services will have DNS resolution of testService.1, testService.2, testSErvice.3, testService.4
Can someone please point out a missing config option or tell me what those ids on the last part of the service name is please? I am trying to build a fully fault tolerant system with docker and I really need those dns entries to always be consistent. Thank you for your time.