DistributedAdvanced
Explain the CAP theorem
“What does CAP actually say, and what is the real everyday tradeoff?”
What this tests
- Correct CAP understanding
- PACELC
Answers by level
Read the beginner answer first and notice what is missing.
The "pick two" phrasing is misleading. Partitions happen, so partition tolerance is not optional. CAP says only that during a partition you must choose between consistency (refuse writes on the minority side) and availability (accept writes on both sides and reconcile later). When there is no partition — almost always — you have both.
The everyday tradeoff is latency vs consistency (PACELC): synchronous replication is consistent and slow, asynchronous is fast and eventually consistent.
Green flags · Red flags
Strong green flag · Names the everyday trade as latency vs consistency.
Green flags
- Rejects naive "pick two"
- Choice is only during a partition
- Knows PACELC
Red flags
- "Pick any two"
- Thinks P is optional
Follow-up questions
F1
CP or AP for a bank ledger vs a shopping cart?
Scenario
A vendor claims their database is "CA — consistent and available". What is wrong with that claim?