300-910 · Question #42
A three-tier web application must be moved to containers. A webserver is already in place, and the middleware container can talk to a central database server. The hostname of the database server is kn
The correct answer is A. Docker Service discovery daemon. The question asks where the middleware server's name should be configured for a webserver to discover it in a containerized environment when the application is moved to containers.
Question
Exhibit
Options
- ADocker Service discovery daemon
- BDocker Swarm
- CDocker Compose
- DDynamic Host Configuration Protocol
How the community answered
(33 responses)- A73% (24)
- B15% (5)
- C9% (3)
- D3% (1)
Why each option
The question asks where the middleware server's name should be configured for a webserver to discover it in a containerized environment when the application is moved to containers.
The Docker daemon's integrated service discovery mechanism, when containers are part of a user-defined network, automatically configures an internal DNS server. This allows containers like the webserver to resolve other container names (e.g., the middleware server's name) to their IP addresses, enabling communication without hardcoding IPs. The daemon essentially "configures" the network's ability to discover services by name.
Docker Swarm is an orchestration tool; it relies on service discovery but is not the direct mechanism or configuration file for name resolution itself.
Docker Compose is used to define service names in a `docker-compose.yml` file, but it's the Docker daemon's service discovery feature that implements the runtime resolution, configuring the network to make those names usable by other containers.
DHCP assigns IP addresses dynamically, but Docker's service discovery uses DNS for name resolution between containers, not DHCP.
Concept tested: Docker service discovery
Source: https://docs.docker.com/compose/networking/
Topics
Community Discussion
No community discussion yet for this question.
