Load-balancing and scale in swarm mode

Docker uses DNS for service discovery, so containers can find one another with standard networking. Applications use server names in their client connection configuration, and when the application makes a DNS query to find the target, Docker responds with the container's IP address. It's the same in Docker Swarm when your target server name could actually be the name of a Docker service running with dozens of replicas across the cluster.

There are two ways for Docker to respond to manage DNS for a service with multiple replicas. The default is to use VIP: a virtual IP address. Docker uses a single IP address for the service, and relies on the networking stack in the host operating system to route a request ...

Get Docker on Windows - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.