Consistency Models: From Linearizable to Eventual
Explore the full consistency spectrum from strict linearizability and sequential ordering down to causal, client-centric, and eventual models.
In casual conversation, software engineers often treat consistency as a binary choice: a system is either "strongly consistent" or "eventually consistent".
In distributed systems theory, this is a vast oversimplification. Consistency is not a light switch. It is a nuanced spectrum of mathematical guarantees governing what values a client read query is permitted to observe across distributed physical nodes.
Understanding where each consistency model sits on the spectrum allows you to make deliberate trade-offs between coordination latency, availability, and user experience.
01Linearizability (Strict Consistency)
Linearizability is the strongest non-transactional consistency model achievable in distributed systems.
Under linearizability, a distributed cluster behaves exactly as if there were only a single atomic copy of the data register in the universe, even if data is replicated across fifty servers worldwide.
The Real-Time Ordering Invariant
The core guarantee of linearizability is governed by real-time wall-clock ordering:
If Operation B starts AFTER Operation A completes in real time,
then Operation B MUST observe the results of Operation A (or a later write).Once a write operation receives an acknowledgment from the cluster, no subsequent read on any node can ever return an older value.
The Architectural Cost
Achieving linearizability requires total consensus coordination. Every single write must be synchronized using consensus algorithms like Raft or Paxos across a strict majority quorum. Furthermore, reads cannot simply query a local replica; they must verify with the leader (via lease read or quorum read) to avoid serving stale data from a partitioned leader.
Engines like Google Spanner achieve linearizability across global data centers using TrueTime, an infrastructure layer combining atomic cesium clocks and GPS receivers to bound clock uncertainty to within a few milliseconds.
Used for: Leader election leases (etcd, ZooKeeper), distributed locks, and financial ledger balances.
Loading the rest of the lesson…