Courseiva

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.

43 questions11 easy17 medium15 hard

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.

1

Which interface would you use to register a service dynamically using standard tools like 'curl'?

Easy
2

A 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.)

Medium
3

A 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?

Medium
4

You need to register a health check that triggers an alert when memory usage is high. Which type of check is most appropriate?

Medium
5

A 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?

Medium
6

A service definition includes a 'meta' block. What is the intended use of this block?

Medium
7

A 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?

Hard
8

Which THREE of the following are valid check types in Consul?

Easy
9

You need to verify if a node has successfully joined the cluster for service discovery. Which tool confirms this?

Medium
10

Which THREE of the following are valid ways to register a service in Consul?

Hard
11

What is the impact of setting 'enable_tag_override' to true in a service definition?

Hard
12

When using Consul DNS for a service, what happens if no instances are healthy?

Hard
13

Which TWO of the following are true regarding the Consul Service Catalog?

Medium
14

When a service check transitions to 'critical', what does Consul do with the service's DNS entry?

Hard
15

An 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?

Medium
16

A 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?

Medium
17

Which TWO of the following are standard DNS records returned by Consul for service discovery?

Easy
18

When multiple agents are in a cluster, how does Consul ensure that service discovery information is consistent across all nodes?

Medium
19

A 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?

Medium
20

A 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?

Hard
21

A 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?

Easy
22

Which TWO of the following statements are true about the 'passing' parameter in DNS queries?

Hard
23

A 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?

Hard
24

An administrator needs to query service information. Which DNS record type is commonly used by Consul to return service addresses?

Easy
25

What is the purpose of the 'service-tag' in a Consul service definition?

Easy
26

A 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'?

Hard
27

Which THREE of the following are valid ways to categorize services in Consul?

Medium
28

An 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?

Hard
29

You 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?

Medium
30

A 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?

Easy
31

An 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?

Hard
32

Which TWO of the following actions occur when a node fails in a Consul cluster?

Hard
33

A 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?

Easy
34

Which of the following best describes the 'consul agent -dev' mode in relation to service discovery?

Easy
35

An 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?

Easy
36

A 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?

Hard
37

Which command is used to check the status of a registered service?

Easy
38

Which THREE of the following are key components of a service definition?

Hard
39

A 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?

Medium
40

What is the effect of changing the 'interval' parameter in a service health check?

Medium
41

Which THREE of the following are benefits of using the Consul DNS interface?

Medium
42

A 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.)

Medium
43

A 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?

Hard

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.
HashiCorp Certified: Consul Associate (Consul 1.15) (Consul 1.15) Service Discovery Practice Questions