Consistency LineLesson
CAP & PACELC
Ledger opens a second region in America. What should a settle-up do when the two regions can't talk — and what does keeping them in agreement cost on the days they can?
13 minMediumStation: CAP & PACELCMembers lesson
Membership isn’t open yet. The free lessons are open — 17 of them.
- Consistency models: strong to eventual
- CAP & PACELC
- Quorums: N, W, R
- Agree on the balance
What you'll be able to do
- 1Explain what CAP forces during a partition — refuse requests to keep consistency, or answer and risk stale or conflicting data — and why "pick two of three" misstates it.
- 2Predict what PACELC's else branch costs with no partition — the extra wait of a consistent write or read against the staleness of a fast one.
- 3Choose, per Ledger operation, which side to take in a partition and in normal running, and place a store — Cassandra, DynamoDB, Spanner, Cosmos DB — on PA/EL, PC/EC or in between.
Inside the lesson
- steps
- 11
- questions
- 11
- simulation
- 1
You guess first, then run the system and see if you were right.
Step 1 · The setup
Ledger's American members complained that pages were slow — every one crossed the ocean to the database in Europe. So Ledger opened a second region: an API and a read replica in America. The primary, where every write lands first, stays in Europe.
Steps 2–11 are for members