Software → Distributed Systems
CAP Theorem
A theorem describing tradeoffs between consistency, availability, and partition tolerance in distributed data systems.
Motivation
CAP theorem explains why distributed systems must make trade-offs when networks fail.
Where it fits
CAP belongs to distributed systems and system design. It helps reason about consistency, availability, and partition tolerance.
Mental model
When a network partition happens, a distributed system must choose whether to continue serving possibly stale data or refuse some requests to preserve consistency.
Common mistakes
- Saying a system “chooses two of three” without considering partitions.
- Treating CAP as the only consistency framework.
- Ignoring latency, isolation levels, and operational behavior.