HashiCorp Certified: Consul Associate Exam-style mock test
HashiCorp Consul Associate Practice Exams|Practice test
Full explanations
Exam format
Pass line 70%
33 USD One-time · lifetime access
Enroll →
Sample questions
Example1 · Consul Architecture and Service Discovery
A B2B SaaS platform runs Consul across a fleet of application hosts. The platform team wants each application node to run a local Consul agent that forwards queries to the cluster but does NOT participate in the Raft consensus quorum. Which agent mode should be configured on these application nodes?
・Server mode, so each node persists state and votes in leader elections
Incorrect. Server mode nodes participate in Raft consensus and persist cluster state, which is exactly what the team wants to avoid on application hosts.
✓Client mode, which registers local services and forwards RPCs to servers
Correct. Client agents register local services and health checks, then forward RPCs to the servers without joining the Raft quorum.
・Bootstrap mode, which elects the application node as cluster leader
Incorrect. There is no persistent bootstrap mode for ordinary nodes; bootstrap_expect is a one-time server setting, not a role for app hosts.
・Gateway mode, which proxies all traffic between datacenters only
Incorrect. Gateways handle cross-datacenter or mesh traffic forwarding and are not the agent role for local service registration.
Explanation
Client-mode agents are lightweight: they handle local registration and health checking and relay requests to servers, while server-mode agents carry the Raft quorum and persisted state.
Example2 · Service Mesh, Intentions, and Connect
A B2B SaaS company runs dozens of internal microservices and wants to secure east-west traffic without rewriting every application to add TLS. Which capability of the Consul service mesh (Connect) most directly addresses this goal?
・It enforces inbound firewall rules at the cloud provider's own network perimeter for all north-south customer-facing traffic.
Incorrect. Connect secures service-to-service (east-west) traffic inside the mesh, not cloud-perimeter firewall rules for north-south traffic.
✓It transparently provides mutual TLS between services using sidecar proxies, so applications need no code changes.
Correct. Connect uses sidecar proxies to establish mutual TLS between services automatically, giving encryption and identity without application code changes.
・It replaces the company's external API gateway and manages customer-facing authentication tokens.
Incorrect. Connect is not a replacement for an external API gateway handling customer-facing auth; it secures internal service communication.
・It compresses service payloads to reduce bandwidth costs across availability zones.
Incorrect. Connect's purpose is secure identity-based connectivity, not payload compression for bandwidth savings.
Explanation
The core value of the Consul service mesh is transparent mutual TLS and identity-based authorization between services via sidecar proxies, removing the need to modify application code.
Example3 · Health Checks, KV Store, and Sessions
A B2B SaaS platform team registers a 'billing-api' service with Consul and wants the local Consul agent to periodically request an endpoint on the service to confirm it is responding correctly. Which type of health check should they configure for this behavior?
✓An HTTP check that has the agent send a request to a specified URL on a defined interval
Correct. An HTTP check has the agent issue a request to a configured URL at a set interval and marks the service healthy based on the response code.
・A TTL check that simply waits for the service itself to periodically push an update about its own current status
Incorrect. A TTL check relies on the application pushing its own status and does not have the agent actively probe an endpoint.
・A node-level check that only verifies the host is reachable over the network
Incorrect. A node-level check assesses host health rather than probing a specific service endpoint.
・An alias check that mirrors the status of a different registered service
Incorrect. An alias check copies another service's status instead of actively requesting an endpoint.
Explanation
HTTP checks are agent-driven probes against a service URL on an interval, which matches the requirement to actively confirm the endpoint is responding.
Example4 · Security: ACLs, TLS, and Gossip Encryption
A healthcare services firm enables the Consul ACL system across its patient-records cluster. After bootstrapping, the operations team notices that service registration and catalog reads from existing agents suddenly begin to fail. What default behavior is the most likely cause?
✓The default policy was set to deny, so requests without a token presenting sufficient privileges are rejected
Correct. With the default policy set to deny, any request lacking a token with adequate privileges is rejected, which is exactly why unauthenticated agents start failing after ACLs are enabled.
・Gossip encryption keys were rotated automatically during the bootstrap process
Incorrect. Enabling the ACL system does not trigger gossip encryption key rotation; these are separate security subsystems.
・The ACL bootstrap reset the TLS certificate authority for all servers
Incorrect. ACL bootstrapping manages tokens and policies and does not touch or reset the TLS certificate authority.
・Anonymous requests are always granted full write access until tokens are issued
Incorrect. Under a default-deny configuration, anonymous requests are denied, not granted full write access.
Explanation
When the ACL system is enabled with a default policy of deny, every request must present a token carrying sufficient privileges, so agents operating without proper tokens begin failing until tokens are configured.
Example5 · Multi-Datacenter, Federation, and Operations
A healthcare services firm runs separate Consul datacenters in its east-coast and west-coast clinics and wants the server nodes in both to discover one another so cross-datacenter service lookups work. Which Consul mechanism lets the server agents across these two datacenters learn about each other?
✓The WAN gossip pool, which server agents join to discover servers in the other datacenter
Correct. Server agents participate in the WAN gossip pool, which spans datacenters and lets servers in one datacenter discover servers in another to enable federation.
・The LAN gossip pool shared by every client agent running in both regions together
Incorrect. The LAN gossip pool is scoped to a single datacenter and does not connect servers across datacenters.
・A dedicated Vault transit secrets engine configured separately on each server
Incorrect. A Vault transit engine handles encryption-as-a-service and is unrelated to cross-datacenter server discovery.
・The local DNS resolver running on every client node in the cluster
Incorrect. A node's local DNS resolver does not provide any cross-datacenter server membership capability.
Explanation
Multi-datacenter federation relies on the WAN gossip pool, which server agents join so each datacenter's servers can discover and communicate with servers in other datacenters.
Example6 · Consul Architecture and Service Discovery
A healthcare services firm runs Consul across dozens of nodes hosting patient-scheduling microservices. The platform team wants to understand which agent type actually stores the catalog state and participates in Raft replication. Which statement correctly describes the Consul server agent's role?
・Server agents cache service data locally but forward every write to the clients.
Incorrect. The flow is reversed: clients forward writes (RPCs) to servers, which hold the authoritative state.
・Server agents only relay gossip and keep no state.
Incorrect. Servers do far more than gossip; they persist catalog and KV state via Raft.
✓Server agents maintain the cluster state, participate in Raft, and respond to queries.
Correct. Server agents form the Raft quorum, persist catalog and KV data, and answer queries from clients.
・Server agents register the local services running on the same host they run on.
Incorrect. Registering local host services is the job of the lightweight client agent, not the server.
Explanation
Consul servers hold the authoritative cluster state and participate in Raft consensus, while clients are lightweight agents that forward requests and register local services.
Example7 · Consul Architecture and Service Discovery
The platform team at the retail brand UrbanThread is designing its first Consul datacenter. They plan to run a Consul agent on every host that hosts an application workload, plus a dedicated cluster of agents responsible for persisting cluster state and participating in leader election. Which statement correctly describes the responsibilities of these two agent modes?
・Client agents persist all service catalog data to disk, while server agents only forward RPC requests to clients
Incorrect. Client agents do not persist the catalog; servers hold the authoritative state and clients are stateless beyond local registrations.
✓Client agents register and health-check local services and forward queries to servers, while server agents maintain cluster state and elect a leader via the consensus protocol
Correct. Client agents handle local service registration and health checks and relay queries, while servers store state and run leader election through the Raft consensus protocol.
・Both client and server agents independently persist the full catalog, and leader election happens across every agent in the datacenter
Incorrect. Only server agents participate in the consensus protocol and hold authoritative state; clients do not persist the full catalog.
・Server agents run on every application host, while client agents form the small quorum cluster that stores state
Incorrect. The roles are reversed here; servers form the quorum and clients run on application hosts.
Explanation
Client agents are lightweight, run on every workload node, register services, run health checks, and forward RPCs to servers. Server agents maintain cluster state and participate in Raft-based leader election.
Example8 · Consul Architecture and Service Discovery
UrbanThread's SRE team must decide how many Consul server agents to deploy so that the control plane can tolerate the failure of one server without losing availability. Which protocol governs leader election and replication among the servers, and what is the smallest recommended server count that tolerates one failure?
・The gossip protocol with 2 servers
Incorrect. Gossip handles membership and failure detection, not leader election or replication, and two servers cannot form a tolerant quorum.
✓Raft consensus protocol; 3 servers
Correct. Consul servers use Raft for replication and leader election, and three servers form a quorum that tolerates the loss of one server.
・The Paxos consensus protocol; 5 servers
Incorrect. Consul uses Raft, not Paxos, for server consensus.
・The Raft consensus protocol with only 1 server
Incorrect. Raft is correct, but a single server has no fault tolerance since its failure loses the quorum.
Explanation
Consul servers use the Raft consensus protocol. A quorum of (N/2)+1 is required, so three servers tolerate one failure while still maintaining a majority.
Example9 · Consul Architecture and Service Discovery
During a datacenter review, an UrbanThread engineer asks how agents discover one another and detect node failures within a single datacenter, independent of the server consensus layer. Which mechanism provides this membership and failure detection?
・A centralized heartbeat service polled by the Raft leader every second
Incorrect. There is no centralized heartbeat poller; membership is decentralized via gossip.
✓The Serf gossip protocol operating over a LAN pool among datacenter agents
Correct. Consul uses the Serf-based gossip protocol over a LAN pool so all agents share membership information and detect failures without a central component.
・DNS SRV record lookups issued by each client agent on a fixed schedule
Incorrect. DNS SRV lookups are for service discovery queries, not node membership or failure detection.
・The HTTP health API scraping every registered service endpoint directly
Incorrect. The health API reports check status but is not the membership and failure-detection mechanism.
Explanation
The gossip protocol (built on Serf) operates over a LAN pool within a datacenter to manage membership and detect failed nodes in a decentralized way, separate from Raft consensus.
Example10 · Consul Architecture and Service Discovery
A financial services firm runs a Consul datacenter with five server agents to support its payment gateway. During a maintenance window, two of the five servers are taken offline simultaneously. What happens to the datacenter's ability to process writes to the Consul state?
・Writes are rejected because any server outage immediately halts the Raft log
Incorrect. A single outage does not halt writes; Raft tolerates failures as long as a quorum remains.
✓Writes continue because three of five servers form a quorum
Correct. With five servers the quorum is three, so three surviving voters can still elect a leader and commit writes.
・Writes continue only if the two offline servers were non-voting followers
Incorrect. In a standard five-voter cluster the remaining three form a quorum regardless of which two left.
・Writes continue because Consul replicates state over the LAN gossip pool
Incorrect. The gossip pool handles membership and failure detection, not replication of the committed Raft state.
Explanation
Consul uses Raft for consensus, and a cluster of N servers requires a quorum of (N/2)+1 voters. Five servers tolerate the loss of two while retaining a quorum of three.
Example11 · Consul Architecture and Service Discovery
On each trading application host at the firm, a Consul agent runs in client mode. A platform engineer asks what this client agent is primarily responsible for. Which statement correctly describes the client agent's role?
・It joins Raft elections and stores the authoritative catalog
Incorrect. Only server agents participate in Raft and hold the authoritative state.
✓It forwards local service registrations and queries to the server agents
Correct. Client agents are lightweight: they register local services and health checks and relay RPCs to the servers.
・It persists the full key/value store so applications can read it during a partition
Incorrect. The key/value store is persisted on servers, not replicated in full to clients.
・It elects a leader among peer clients when the servers are unreachable
Incorrect. Clients do not elect leaders; leader election is a server-only responsibility.
Explanation
Client agents are stateless relays that handle local registration, health checking, and gossip, forwarding RPC requests to the servers that maintain the consensus state.
Example12 · Consul Architecture and Service Discovery
A manufacturing distributor runs Consul across its warehouse fleet. Each application node (order-intake, inventory-sync, shipping) runs a local Consul agent in client mode. An operations engineer asks what work these client-mode agents actually perform in the cluster. Which description is correct?
・They participate in the Raft consensus quorum and persist the authoritative catalog and KV state to disk for the datacenter.
Incorrect. Only server-mode agents take part in Raft consensus and hold the authoritative state; clients do not.
✓They forward RPCs to the servers, run local health checks, and register the node's services.
Correct. Client agents are lightweight: they relay RPCs to servers, execute local health checks, and register the node's services.
・They elect the cluster leader and replicate committed log entries to the other servers.
Incorrect. Leader election and log replication are server responsibilities, not client responsibilities.
・They store encrypted secrets and issue the TLS certificates used across the datacenter.
Incorrect. Secret storage and certificate issuance are Vault or Connect CA functions, not the base role of a client agent.
Explanation
Client agents are stateless relays that handle local registration and health checking, forwarding everything else to the servers, which own consensus.
Example13 · Consul Architecture and Service Discovery
The distributor deploys a Consul server cluster in its primary datacenter. During a design review, an engineer wants to understand why the number of server agents matters for availability. What is the correct explanation of how Consul servers reach agreement on writes?
・Every server independently accepts writes, and conflicts are resolved later using last-write-wins timestamps.
Incorrect. Consul does not allow independent writes with later timestamp resolution; it uses a single leader.
・Writes are broadcast across the cluster using the gossip protocol, and any server that receives a majority of those gossip messages commits.
Incorrect. Gossip handles membership and failure detection, not write consensus.
✓A single elected leader accepts writes and replicates them to followers; a write commits once a quorum acknowledges it.
Correct. Raft elects one leader that accepts writes and replicates to followers, committing only after a quorum acknowledges.
・Clients write directly to a shared external database, and servers simply cache the most recent query results.
Incorrect. Consul servers hold the authoritative state themselves and do not rely on an external shared database.
Explanation
Consul uses the Raft consensus protocol: a single leader replicates log entries and commits only when a majority (quorum) of servers acknowledges.
Example14 · Consul Architecture and Service Discovery
A telecom operator is deploying Consul across its regional billing datacenter. Every virtual machine that hosts a microservice also runs a Consul agent in client mode. An engineer asks what responsibility these client agents carry compared to the Consul servers. Which statement best describes the client agent's role?
・It stores the authoritative copy of the service catalog and participates in Raft leader election for the datacenter.
Incorrect. The authoritative catalog and Raft participation belong to server agents, not clients.
✓It runs local health checks and forwards registrations and queries to the servers, keeping no catalog state.
Correct. Client agents run co-located health checks and relay registrations and queries to servers without keeping durable catalog state.
・It acts as the gossip encryption key authority and rotates WAN keys for every other datacenter in the federation.
Incorrect. Gossip key management is not a client agent responsibility, and WAN rotation is not done this way.
・It signs service mesh certificates and issues leaf certificates to remote proxies.
Incorrect. Certificate signing is handled by the Connect CA on the servers, not by client agents.
Explanation
Client agents are lightweight: they register local services, run their health checks, and forward RPCs to servers. Only server agents hold the catalog, KV store, and participate in Raft.
Example15 · Consul Architecture and Service Discovery
The telecom operator runs a Consul server cluster of five nodes in its core datacenter. During a maintenance window two servers are taken offline simultaneously. An engineer wants to know whether the cluster can still accept writes. What is the correct outcome?
・No writes are accepted because any node loss immediately forces the cluster into read-only mode.
Incorrect. Losing nodes does not force read-only mode as long as a quorum remains.
✓Writes continue because the three remaining servers still form a majority quorum and can elect or retain a stable leader for the cluster.
Correct. A five-node cluster needs three servers for quorum, so the three survivors can maintain a leader and keep accepting writes.
・Writes continue only if the two offline servers were follower nodes and never the leader.
Incorrect. Quorum math does not depend on whether the lost nodes were followers or the leader.
・Writes fail until a replacement node is added to restore the original count of five servers.
Incorrect. The cluster keeps functioning with quorum; a replacement is not required for writes to proceed.
Explanation
Raft requires a strict majority (quorum) to commit writes. In a five-node cluster the quorum is three, so losing two servers still leaves a working majority.
▶ Try 10 free questions (graded)