The CAP Theorem: Consistency vs. Availability Under Partition
Why every distributed data store eventually has to choose between returning a possibly-stale answer and returning no answer at all.
Intermediate
| Property | Meaning |
|---|---|
| Consistency (C) | Every read receives the most recent write, or an error — no stale data is ever returned. |
| Availability (A) | Every request receives a (non-error) response, without guarantee that it contains the most recent write. |
| Partition tolerance (P) | The system keeps operating even when network failures split it into groups of nodes that can't talk to each other. |
| Choice | Behavior | User-facing effect |
|---|---|---|
| Favor Consistency (CP) | The EU replica refuses the read (or blocks) until it can confirm it has the latest data. | "Sorry, try again in a moment" — correctness over uptime. |
| Favor Availability (AP) | The EU replica returns whatever it has, even if it's stale. | "Here's the data" — possibly outdated, but the request never fails. |