Score:0

Docker swarm: communication between replicas of the same service

ng flag

I have a Docker swarm of two machines, and started a service with two replicas:

$ docker service create --replicas 2 --name myservice --network ingress alpine:latest sleep 1d

Now I've got two containers myservice.1.<some_nonce> and myservice.2.<other_nonce> on different machines that can communicate through the overlay network, as expected.

The problem is how to make the instances discoverable for each other. For example, for myservice.1 there should be a way to find myservice.2 without knowing the nonce.

Internal DNS can only resolve the name myservice but not a particular task.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.