Consistency models, ranked
"Eventually consistent" is doing an enormous amount of work in most architecture conversations — it covers everything from "stale for 2 milliseconds" to "stale for an hour, updates arriving in shuffled order." Distributed systems people carved this space into named models, and the names are worth knowing because each one is a specific promise with a specific price. Strongest and priciest first:
- Linearizable — the gold standard: the system behaves as if there were exactly one copy of the data, every operation taking effect instantaneously at some moment between its start and end. Once any write returns, every read anywhere sees it. The price: nodes must coordinate on ordering, meaning consensus (next lesson) and at least one inter-node round trip in the write path. Across regions, that's the full 100+ ms tax per write.
- Sequential — everyone sees all operations in the same order, but that order may drift from real time. (You might see my 12:00:01 write ordered before your 12:00:00 write — but everyone sees that same ordering.)
- Causal — the pragmatic sweet spot. Operations that are causally related appear in order everywhere: a reply never shows up before the message it replies to; an edit never appears before the post it edits. Operations with no causal link may be seen in any order — and nobody can tell. Dramatically cheaper than linearizable, and it's what people usually mean when they say they "need consistency."
- Read your writes — a session-level promise: you always see your own updates; others may lag. Cheap to implement (route the author's reads to the leader briefly — Tier 4's fix) and it covers the single most user-visible symptom of lag. Pound for pound, the most valuable guarantee on this list for consumer products.
- Monotonic reads — time never runs backwards for you. Without it: you refresh a page, land on an up-to-date replica, see the new comment; refresh again, land on a lagging replica, the comment vanishes; refresh, it's back. Data blinking in and out of existence — deeply unsettling to users, trivially fixed by pinning each session to one replica.
- Eventual — the floor: if writes stop, replicas converge... eventually. No promise about when, and no promise about the order you observe along the way. Everything above this line is "eventual, plus a specific promise."
Quorums: overlap as a guarantee
Recall the leaderless setup from Tier 4: N replicas, write to W of them, read from R. The load-bearing arithmetic: if W + R > N, then any read set and any write set must overlap in at least one node — simple pigeonhole — so every read touches at least one node that has the latest write. With N=3, W=2, R=2: 2+2 > 3 ✓, one node can die without stopping reads or writes, and both paths stay reasonably fast. Slide the dials per query: W=3 for a critical write (slower, safer), R=1 for a casual read (faster, riskier). Tunable consistency is the entire sales pitch of this family.
Conflict resolution: when two writes collide anyway
Concurrent writes to the same key on different nodes still happen. Three ways to settle it, honestly ranked:
- Last-write-wins: compare timestamps, keep the later one. Simple — and quietly rotten: it needs synchronised clocks (which distributed machines don't truly have), and the "losing" write is silently deleted. LWW is data loss wearing a tie. Acceptable only where losing an update genuinely doesn't matter.
- Version vectors: per-node version bookkeeping that lets the system detect "these two writes were concurrent — neither knew about the other," and hand both to the application to merge knowingly, instead of guessing.
- CRDTs (conflict-free replicated data types): data structures mathematically constructed so concurrent updates merge deterministically, in any order, no coordination — counters that sum correctly, sets that union correctly, sequences that interleave sanely. This is how collaborative editors let two people type in the same document offline and converge cleanly. The constraint: your data must fit one of the shapes with a well-defined merge.
Assuming "strongly consistent" is simply better, the way more RAM is better. Linearizability across regions puts a cross-region round trip inside every write — a permanent 100+ ms floor no optimisation can remove. Meanwhile users viscerally notice 200 ms of lag on every action, and don't notice a like count being briefly wrong. Consistency is a budget: spend it on balances and inventory, not on applause counters.