All insights
ArchitectureData5 min read
The CAP theorem in plain English
CAP theorem gets used to justify all kinds of decisions, often by people who can't quite explain it. Here's the version that actually matters at runtime.
When the network between your databases gets confused — and it will, eventually — you have to pick what to give up: serving requests, or serving correct answers. That's the whole theorem, more or less.
What it actually means
Consistency: every client sees the same data. Availability: every request gets a response. Partition tolerance: the system keeps working when the network drops messages. In a partition, you can have one of the first two — not both. Picking is the work.
The honest choices
- Pick consistency: refuse the request rather than return stale data.
- Pick availability: serve possibly-stale data rather than refuse.
- Most real systems do both, in different places, for different operations.
CAP isn't a constraint to argue around. It's a forced choice every distributed system makes whether you noticed or not.