Consul 1.15 · domain
Service Discovery
Service Discovery covers how services and nodes register with Consul, how health checks gate their visibility, and how clients locate healthy instances via DNS or HTTP. Questions test catalog registration, TTL and other check behavior, node failure consequences, and cross-datacenter query resolution using real Consul APIs and defaults.
Focused practice
Practice Service Discovery questions
Scored sessions drawing only from this domain — pick a length below.
Start 20-question practice test →What this domain covers
What to know about Service Discovery
Be able to register a service with a health check through the Consul HTTP API and predict its status transitions, including TTL expiry and deregistration. The key skill is knowing how check state controls whether an instance is returned by DNS or catalog queries.
Registering services and health checks via the /v1/agent/service/register HTTP API
TTL check semantics: pass, warn, fail endpoints and deregistration after critical timeout
DNS interface queries like user-auth.service.consul and default datacenter scoping
How node failure marks checks critical and removes node from catalog health results
Watch out for
Common Service Discovery exam traps
- ▸Assuming a TTL check starts passing automatically; without a pass call it goes critical and can trigger deregistration.
- ▸Forgetting that DNS queries default to the local datacenter unless a datacenter is explicitly specified.
- ▸Confusing service registration with health: a registered service still appears unhealthy until its checks pass.
Question index
All Service Discovery questions (43)
Click any question to see the full explanation, or start a practice session above.
Which interface would you use to register a service dynamically using standard tools like 'curl'?
Easy2A DevOps engineer is configuring a Consul service `payment-processor` that must be discoverable only when its health check is passing. The service is registered with a script health check that runs every 10 seconds. The engineer wants to ensure that DNS queries for `payment-processor` return only healthy instances. Which two actions should the engineer take? (Choose two.)
Medium3A Consul operator observes that a web service registered on two nodes is only reachable through the DNS interface on one node. The service definition on both nodes is identical, including the same service name and port. What is the most likely cause?
Medium4You need to register a health check that triggers an alert when memory usage is high. Which type of check is most appropriate?
Medium5A Consul operator is using the HTTP API to register a web service with an external health check script. The operator wants to ensure that if the service process fails but the node remains up, the service is marked unhealthy and removed from DNS query results. Which of the following API endpoints should the operator use to register the service and its check together?
Medium6A service definition includes a 'meta' block. What is the intended use of this block?
Medium7A Consul cluster has three server nodes and multiple client agents. A service 'db' is registered on two nodes, each with a health check that includes 'DeregisterCriticalServiceAfter' set to '1h'. One of the nodes experiences a network partition and becomes unreachable. After 2 hours, the node rejoins the cluster. What happens to the service instance on that node?
Hard8Which THREE of the following are valid check types in Consul?
Easy9You need to verify if a node has successfully joined the cluster for service discovery. Which tool confirms this?
Medium10Which THREE of the following are valid ways to register a service in Consul?
Hard11What is the impact of setting 'enable_tag_override' to true in a service definition?
Hard12When using Consul DNS for a service, what happens if no instances are healthy?
Hard13Which TWO of the following are true regarding the Consul Service Catalog?
Medium14When a service check transitions to 'critical', what does Consul do with the service's DNS entry?
Hard15An operator wants to query the Consul catalog for all nodes that provide a service named `api` in the `us-east` datacenter. They need to retrieve the node names and addresses. Which Consul HTTP API endpoint should they use?
Medium16A developer runs `dig @127.0.0.1 -p 8600 web.service.consul SRV` and receives no records, even though `consul catalog services` lists `web` and `consul members` shows the node as alive. A health check for the `web` service is registered and currently shows a critical status. What is the most likely cause of the empty SRV response?
Medium17Which TWO of the following are standard DNS records returned by Consul for service discovery?
Easy18When multiple agents are in a cluster, how does Consul ensure that service discovery information is consistent across all nodes?
Medium19A platform engineer is adding a new service to Consul. The service must appear in the catalog with the name 'billing', be reachable over DNS at billing.service.consul, and be associated with the tag 'prod'. Which registration block correctly achieves this when using the HTTP API?
Medium20A Consul operator needs to deregister a specific service instance named 'web-01' from a node without affecting other instances of the same service. The service was registered with the ID 'web-01'. Which action accomplishes this?
Hard21A developer needs to register a service named 'api' with Consul and ensure that it is only discoverable by consumers that explicitly request the 'v2' tag. Which Consul feature should be used?
Easy22Which TWO of the following statements are true about the 'passing' parameter in DNS queries?
Hard23A Consul cluster is used for service discovery across multiple datacenters. A service named 'api' is registered in both datacenter 'dc1' and 'dc2'. A client in 'dc1' needs to discover instances of 'api' in 'dc2' using DNS. Which DNS query format should the client use?
Hard24An administrator needs to query service information. Which DNS record type is commonly used by Consul to return service addresses?
Easy25What is the purpose of the 'service-tag' in a Consul service definition?
Easy26A service is intermittently failing to resolve via DNS because it has multiple health checks, some of which are 'warning'. How do you ensure it is only returned when all checks are 'passing'?
Hard27Which THREE of the following are valid ways to categorize services in Consul?
Medium28An operator registers a service 'cache' with an HTTP health check pointing to https://10.0.0.5:8443/health. The service appears in the catalog, but DNS queries for cache.service.consul return no records, and the check status shows critical with the message 'Get https://10.0.0.5:8443/health: x509: certificate signed by unknown authority'. Which action resolves the issue while keeping the check functional?
Hard29You have a service that requires specific routing logic based on the environment. How can you distinguish between 'production' and 'staging' instances of the same service name using metadata?
Medium30A DevOps engineer needs to register an external service that runs outside the Consul datacenter, such as a third-party API. The service has a static IP address and a known port. Which Consul feature should be used to make this service discoverable within Consul?
Easy31An operator registers a service with a TTL health check. The service is responsible for updating the check status via the HTTP API. The service fails to send updates for 90 seconds. The check is configured with 'DeregisterCriticalServiceAfter' set to 10 minutes. What is the current health status of the service, and what will happen after 10 minutes?
Hard32Which TWO of the following actions occur when a node fails in a Consul cluster?
Hard33A developer registers a service 'web-frontend' with Consul using the HTTP API. The service registration includes a health check with a TCP check on port 8080 and an interval of '15s'. After registration, the developer queries the service using the DNS interface: 'dig @127.0.0.1 -p 8600 web-frontend.service.consul'. The query returns no results. Which of the following is the most likely reason?
Easy34Which of the following best describes the 'consul agent -dev' mode in relation to service discovery?
Easy35An operator registers a web service with Consul using the HTTP API. The registration includes a TTL health check with a 30-second interval, but the application code does not yet call the pass endpoint. Shortly after registration, the service disappears from healthy DNS results. What is the most likely reason?
Easy36A Consul cluster spans multiple datacenters. A service `user-auth` is registered in both `dc1` and `dc2`. A client in `dc1` queries the DNS interface for `user-auth.service.consul`. By default, which instances will be returned?
Hard37Which command is used to check the status of a registered service?
Easy38Which THREE of the following are key components of a service definition?
Hard39A service is registered with Consul using the HTTP API, but it is not appearing in DNS queries. The service definition includes a health check that is currently critical. What is the most likely reason for the DNS query failure?
Medium40What is the effect of changing the 'interval' parameter in a service health check?
Medium41Which THREE of the following are benefits of using the Consul DNS interface?
Medium42A developer registers a service named 'orders' on a Consul node and wants DNS queries for orders.service.consul to return the service's SRV records so clients can discover both the address and the port. The developer is verifying that the registration contains everything needed for SRV resolution. Which two registration elements must be present for SRV queries to return usable records? (Choose two.)
Medium43A Consul operator is troubleshooting a service that intermittently disappears from the catalog. The service is registered with a TTL health check that is updated every 30 seconds by a script. The operator notices that the service is marked as critical and then deregistered. Which configuration change should the operator make to prevent the service from being deregistered?
HardOther domains
All Consul 1.15 exam domains
Frequently asked questions
- What does the Service Discovery domain cover on the Consul 1.15 exam?
- Be able to register a service with a health check through the Consul HTTP API and predict its status transitions, including TTL expiry and deregistration. The key skill is knowing how check state controls whether an instance is returned by DNS or catalog queries.
- How many questions are in this domain?
- This page lists all 43 Service Discovery questions in the Consul 1.15 question bank. The actual exam draws from this domain proportionally to its weighting in the official exam blueprint.
- What is the best way to practise this domain?
- Start with a short focused session (10 questions) to identify gaps, then work through explanations. Repeat with a longer session once the weak areas feel solid.
- Can I practise only Service Discovery questions?
- Yes — the session launcher on this page filters questions to this domain only. Choose any session length for inline explanations and scoring.