Courseiva

Consul 1.15 · topic practice

Key Value Store practice questions

The Key Value Store domain covers Consul's distributed KV store: reading and writing keys via the HTTP API and the `consul kv` CLI, blocking queries and watches, check-and-set semantics using ModifyIndex, and ACL enforcement. Questions test API parameters, status codes, and how KV interacts with Consul's consistency and permissions model.

Courseiva uses original exam-style practice questions designed for learning and revision. The goal is to understand the concepts, recognise exam patterns, and improve through explanations — not memorise copied exam dumps.

Editorial oversight:Johnson Ajibi· MSc IT Security, IEEE Senior Member
20 questionsDomain: Key Value Store

What the exam tests

What to know about Key Value Store

Be able to read and write KV entries with the CLI and HTTP API, apply check-and-set using the `cas` parameter (cas=0 creates only if absent), and diagnose 403s as ACL policy failures. The single most important thing: know that `cas` enforces atomic conditional writes based on ModifyIndex.

Using `consul kv put`, `get`, `delete`, and `export`/`import` CLI subcommands correctly

HTTP API endpoints like `/v1/kv/:key` with `?cas=`, `?recurse=`, and `?index=` parameters

Blocking queries and watches that fire scripts when a watched key changes

ACL token policies granting `key` and `key_prefix` read/write permissions in Consul

Watch out for

Common Key Value Store exam traps

  • ▸Confusing `cas` check-and-set with `acquire`/`release` session locks; `cas=0` only succeeds when the key does not yet exist
  • ▸Assuming a 403 Forbidden means the key is missing; it almost always indicates an ACL token lacking the required policy
  • ▸Forgetting that blocking queries use `index` and return `X-Consul-Index`, and that watches need a valid token to read protected keys

Practice set

Key Value Store questions

20 questions · select your answer, then reveal the explanation

An application is using Consul KV to store configuration. You notice that the KV store is becoming large. What is the most efficient way to retrieve only the keys under the prefix "service/web/"?

Which flag can be used to pass arbitrary metadata to a KV entry?

What happens to a session if the associated node is marked as 'failed' by the Consul health check?

Which Consul agent configuration parameter defines the KV store file location when running locally?

Which TWO of the following are valid ways to interact with the Consul KV store?

Which THREE of the following are required to successfully acquire a lock on a KV key?

You need to ensure that a value written to the KV store is persisted to disk on a majority of Consul servers before returning. Which parameter affects this?

What happens if you try to write to a key that is currently locked by a session you do not own?

Which TWO of the following are true regarding the behavior of the Consul KV store?

Which THREE of the following are valid session behaviors when a session is invalidated?

Which TWO of the following are valid ways to trigger a KV watch?

Which THREE of the following are standard Consul KV CLI subcommands?

Question 13easymultiple choice
Read the full Key Value Store explanation →

You need to store a small JSON configuration blob in Consul KV and later retrieve it exactly as written. Which Consul CLI command should you use to write the value from a file named config.json to the key app/config?

Question 14hardmultiple choice
Read the full Key Value Store explanation →

You are using Consul KV to store feature flags. A service instance reads a flag using a blocking query with a wait time of 5 minutes. After 3 minutes, the flag is updated. The service instance expects to receive the new value immediately. However, it does not receive an update until the full 5 minutes elapse. What is the most likely reason for this behavior?

Question 15hardmultiple choice
Read the full Key Value Store explanation →

You are using the Consul KV store to store feature flags. You want to ensure that a read request returns the most up-to-date value, even if it means increased latency. Which consistency mode should you use for the KV read operation?

Question 16mediummultiple choice
Read the full Key Value Store explanation →

A CI pipeline writes build artifacts metadata under `ci/builds/`. An operator needs to remove the entire `ci/builds/` subtree, including all nested keys, in a single command without affecting `ci/other/`. Which command accomplishes this?

You are using Consul KV to store feature flags for a distributed application. You need to perform a transaction that atomically updates two keys: one to enable a feature and another to set its rollout percentage. Which two Consul KV operations can be combined in a single transaction to achieve this? (Choose two.)

Question 18mediummultiple choice
Read the full Key Value Store explanation →

You are using the Consul KV store to coordinate a rolling deployment. A service instance acquires a lock on the key 'deploy/lock' with a session that has a TTL of 30 seconds. The instance crashes, but the Consul agent on that node remains healthy and continues to send TTL renewals because the application process that owned the session was separate from the agent. What will happen to the lock?

You are designing a system that uses Consul KV to store configuration data. You need to ensure that reads are highly available and can tolerate stale data, while writes must be strongly consistent. Which TWO of the following statements are true regarding Consul's consistency modes for KV operations? (Choose two.)

Question 20hardmultiple choice
Read the full Key Value Store explanation →

A service reads a KV key that holds a leader-election lock value and must never receive data older than its previous read, even if that means contacting the leader over extra network hops. Which read behavior should the operator request from the KV API?

Free account

Track your progress over time

Create a free account to save your results and see which topics improve across sessions.

Focused Key Value Store sessions

Start a Key Value Store only practice session

Every question in these sessions is drawn from the Key Value Store domain — nothing else.

Related practice questions

Related Consul 1.15 topic practice pages

Move into related areas when this topic feels solid.

Frequently asked questions

What does the Consul 1.15 exam test about Key Value Store?
Be able to read and write KV entries with the CLI and HTTP API, apply check-and-set using the `cas` parameter (cas=0 creates only if absent), and diagnose 403s as ACL policy failures. The single most important thing: know that `cas` enforces atomic conditional writes based on ModifyIndex.
How should I use these practice questions?
Select your answer before revealing the explanation. Then read why each option is right or wrong — this active recall approach builds retention far faster than re-reading notes.
Can I practise just Key Value Store questions in a focused session?
Yes — the session launcher on this page draws every question from the Key Value Store domain. Use a 10-question session first to gauge your baseline, then move to 20 or 30 once the weak spots are clear.
Where can I practise other Consul 1.15 topics?
Use the topic links above to move to related areas, or go back to the Consul 1.15 question bank to see all topics.
Are these real exam questions or dumps?
These are original practice questions written to test the same concepts the Consul 1.15 exam covers. They are not copied from any real exam or dump site.