The CAP theorem.
When the network splits, you can keep answering or keep everyone in sync, but not both.
- 1
Two clerks in two cities keep copies of the same ledger, syncing every change as it lands.
- Hello? …anyone?2
One day the phone line between the cities goes dead. Neither clerk can reach the other.
- Can you update my balance?3
A customer walks up and asks to make a change. Now the clerk is stuck.
- Sorry — come back later.4
Choose consistency: refuse until the line is back, so the two ledgers can never disagree.
- Done — we’ll reconcile later.5
Choose availability: take the change anyway, knowing the two ledgers now tell different stories.
- 6
When the line is healthy you get both. CAP is only the choice you make during the split.
Semicolony semicolony.dev/eli5/cap-theorem/comic