Introduction
When you run multiple containers that need to talk to each other, they must find each other by name. DNS resolution lets containers use simple names instead of IP addresses, making communication easier and more reliable.
When you want a web app container to connect to a database container using a simple name.
When you run multiple microservices in separate containers that need to call each other.
When you want to avoid hardcoding IP addresses that can change every time containers restart.
When you want to organize containers in a network so they can discover each other automatically.
When you need to scale containers and want them to find new instances by name.