Replication & ConsistencyConsistency ModelsEasy⏱️ ~3 min

What Are Consistency Models and Why Do They Matter?

Consistency models define the contract between a distributed system and its clients about when and in what order updates become visible across replicas. When you write data to a distributed system with multiple replicas, consistency models answer fundamental questions: Will a subsequent read see that write? Will different clients see updates in the same order? Can a client see its own writes immediately? These guarantees are independent of specific databases or APIs and can be implemented through various replication, coordination, and routing patterns. The spectrum ranges from linearizability (strongest) where every operation appears to take effect atomically at a single point in real time, down to eventual consistency (weakest) where replicas converge only if updates stop. Between these extremes lie models like sequential consistency, causal consistency, and session guarantees, each trading off different dimensions. The PACELC framework captures the fundamental tradeoff: under network Partitions, choose Availability vs Consistency; Else (normal operation), choose Latency vs Consistency. Stronger consistency increases commit latency and coordination cost, especially across geographic regions where each additional round trip can add 100 to 200 milliseconds. Consistency models directly impact system behavior under real world conditions. Google Spanner achieves linearizability globally but requires commit wait periods tied to clock uncertainty (typically around 7 milliseconds within a region) plus network round trips, resulting in write latencies of tens of milliseconds within regions and 100 to 200+ milliseconds for cross continent transactions. Amazon DynamoDB offers both strongly consistent reads and eventually consistent reads within a region, where eventual reads deliver twice the throughput (up to 6000 reads per second per partition versus 3000 for strong reads). The choice of consistency model is not just theoretical; it determines your system's latency profile, availability under failures, throughput capacity, and application complexity.
💡 Key Takeaways
Consistency models define when and in what order updates become visible across replicas in distributed systems, independent of specific database implementations
PACELC framework: during Partitions choose Availability vs Consistency; during normal operation choose Latency vs Consistency, with stronger models adding coordination cost
Linearizability (strongest) makes operations appear atomic in real time but costs at least 1 to 2 network round trips per write, adding 100 to 200+ milliseconds for cross region operations
Eventual consistency (weakest) eliminates synchronous coordination for single digit millisecond writes and doubled read throughput, but introduces temporary anomalies and staleness
Production systems span the spectrum: Google Spanner provides global linearizability with TrueTime, while Amazon DynamoDB offers tunable consistency with 2× throughput gain for eventual reads
The consistency choice directly impacts user experience, infrastructure cost, development complexity, and system behavior during network partitions or failures
📌 Examples
Google Spanner implements linearizability with commit wait equal to clock uncertainty (approximately 7 ms) plus Paxos replication, resulting in single row writes completing in low tens of milliseconds within a region
Amazon DynamoDB delivers 3000 strongly consistent reads per second per partition versus 6000 eventually consistent reads per second, demonstrating the 2× throughput advantage of weaker consistency
Facebook TAO provides read your writes within a region but asynchronous cross datacenter replication with typical lag of seconds, optimizing for read heavy social graph workloads
Amazon S3 since 2020 offers strong read after write consistency within regions (PUT then GET sees new data) but cross region replication remains asynchronous with propagation delays of seconds or longer
← Back to Consistency Models Overview
What Are Consistency Models and Why Do They Matter? | Consistency Models - System Overflow