Strong Consistency (Linearizability)
What You'll Learn
You'll understand linearizability, the strongest consistency model where every operation appears to execute atomically at a single instant in real-time order.
The Core Idea
Imagine a single-file line at a coffee shop. Each person orders, gets their drink, and leaves—one at a time. No matter who's watching, everyone agrees on the order things happened. Linearizability makes a distributed system behave exactly like this: as if there's just one copy of the data, and every operation happens instantly at some point between when it started and when it finished.
In a linearizable system:
- Operations appear atomic—they take effect instantaneously at some point during their execution
- All clients see operations in a single, total order
- This order respects real-time: if operation A completes before operation B starts, then A must appear before B in the order
Think of it as "one at a time, right now." If you write a value and the write completes, every subsequent read must see that value (or a newer one). No exceptions, no delays, no stale reads.
Why It Matters
Linearizability is the gold standard because it makes distributed systems act like single-machine programs. You can reason about them intuitively—what happens "happens," and everyone agrees. This eliminates entire classes of subtle bugs.
The trade-off? It's expensive. Achieving linearizability typically requires coordination across nodes, which means higher latency and reduced availability during partitions (recall the CAP theorem: you sacrifice availability to maintain consistency during network splits).
Key Takeaway: Linearizability guarantees operations appear to execute atomically in a single global order that matches real-time causality, making distributed systems behave like centralized ones at the cost of performance and availability.