Explain the CAP Theorem in one paragraph
A distributed-systems classic that trips senior engineers as often as juniors.
Question
Explain the CAP theorem. In a network partition, which two properties must you choose between?
Answer
CAP states that a distributed data store can guarantee at most two of: **Consistency** (every read sees the latest write), **Availability** (every request receives a non-error response), and **Partition tolerance** (the system continues despite network splits). Since partitions are unavoidable in real networks, you effectively choose between C and A *during* a partition. CP systems (e.g., etcd, ZooKeeper) reject writes to preserve consistency. AP systems (e.g., Cassandra, DynamoDB with eventual reads) keep serving but may return stale data. Modern systems tune this per-operation via consistency levels rather than picking one label globally.
See question and answer above.
Keep reading
You may also like
interview
Difference between Process and Thread
An OS fundamentals question every backend engineer must nail.
interview
What happens when you type a URL in the browser?
The definitive end-to-end walkthrough — DNS to render.
interview
Difference between Docker and Kubernetes
One of the most common early-career interview questions. Nail the answer in 3 sentences.
Discussion (0)
No comments yet. Be the first to weigh in.