nerdexam
Docker

DCA · Question #22

Which of the following modes can be used for service discovery of a Docker swarm service (Pick 2 correct answers)

The correct answer is A. Virtual IP (VIP) with --endpoint-mode vip C. DNS Round-Robin with --endpoint-mode dnsrr. Docker Swarm services support Virtual IP (VIP) and DNS Round-Robin (DNS RR) as modes for internal service discovery and load balancing.

Submitted by joshua94· Apr 18, 2026Container Orchestration

Question

Which of the following modes can be used for service discovery of a Docker swarm service (Pick 2 correct answers)

Options

  • AVirtual IP (VIP) with --endpoint-mode vip
  • BOverlay with --endpoint-mode overlay
  • CDNS Round-Robin with --endpoint-mode dnsrr
  • DIngress with --endpoint-mode ingress
  • ENetwork Address Translation(NAT) with --endpoint-mode nat

How the community answered

(32 responses)
  • A
    88% (28)
  • B
    6% (2)
  • D
    3% (1)
  • E
    3% (1)

Why each option

Docker Swarm services support Virtual IP (VIP) and DNS Round-Robin (DNS RR) as modes for internal service discovery and load balancing.

AVirtual IP (VIP) with --endpoint-mode vipCorrect

The `--endpoint-mode vip` uses a single virtual IP address for the service, and Swarm's internal load balancer distributes incoming requests to the service's healthy tasks, providing a stable endpoint.

BOverlay with --endpoint-mode overlay

`overlay` refers to a network driver type, not a specific endpoint mode for service discovery within Docker Swarm.

CDNS Round-Robin with --endpoint-mode dnsrrCorrect

The `--endpoint-mode dnsrr` (DNS Round-Robin) uses DNS queries to return a list of IP addresses for all healthy service tasks. Clients then perform their own load balancing by selecting an IP from the list to connect directly.

DIngress with --endpoint-mode ingress

`ingress` is a type of network used for external access to Swarm services, not an endpoint mode for internal service discovery and load balancing.

ENetwork Address Translation(NAT) with --endpoint-mode nat

`nat` (Network Address Translation) is a general networking concept and not a specific endpoint mode for Docker Swarm service discovery.

Concept tested: Docker Swarm service endpoint modes

Source: https://docs.docker.com/engine/reference/commandline/service_create/#endpoint-mode

Topics

#Docker Swarm#Service Discovery#Endpoint Modes#Networking

Community Discussion

No community discussion yet for this question.

Full DCA Practice