Service Discovery
Let’s learn about service discovery.
We'll cover the following
As well as core networking, libnetwork also provides service discovery that allows all containers and Swarm services to locate each other by name. The only requirement is that the containers be on the same network.
Under the hood, Docker implements a native DNS server and configures every container to use it for name resolution.
The figure below shows a container called c1
pinging another container called c2
by name. The same principle applies to Swarm service replicas.
Get hands-on with 1300+ tech skills courses.