1What does eventual consistency guarantee about read values during normal operation?
Eventual consistency is a consistency model guaranteeing that if no new updates are made to a data item, all replicas will eventually converge to the same value. It is the default model for many distributed databases (DynamoDB, Cassandra) and is the consistency counterpart to high availability in the CAP trade-off.
Eventual consistency is the weakest standard consistency guarantee for distributed systems, and also the most widely deployed. It states that if all writes to a data item stop, all replicas will eventually return the same value. The key word is 'eventually' -- the convergence time is typically milliseconds to seconds under normal conditions, but during network partitions or high load, it can stretch to minutes. During the convergence window, different clients reading from different replicas may see different values for the same key.
Eventual consistency is the natural result of asynchronous replication. When a write is acknowledged after being persisted on one node (the leader or coordinator), it is replicated to other nodes in the background. Until replication completes, replicas hold stale data. This is the trade-off at the heart of the PACELC theorem: even without partitions, choosing low write latency (asynchronous replication) means accepting eventual consistency. Synchronous replication provides stronger consistency but at higher latency and lower availability.
The practical implications of eventual consistency vary widely. For some applications, stale reads are harmless -- a social media feed showing a post 2 seconds late is invisible to users. For others, staleness causes real problems -- a banking application showing a stale balance after a deposit could lead to overdraft decisions. The challenge is not just the staleness window but the lack of ordering guarantees: without additional mechanisms, there is no guarantee about which version a replica returns. A replica might show value A, then value B, then value A again (if updates arrive out of order).
Stronger variants of eventual consistency address specific problems. Read-your-writes consistency (session consistency) ensures that a client always sees its own writes. Monotonic read consistency ensures a client never sees a value older than one it has already seen. Causal consistency ensures that causally related events are seen in order. These variants are strictly stronger than basic eventual consistency but weaker than linearizability, and most AP systems support one or more of them. CRDTs (Conflict-free Replicated Data Types) take a different approach: they define data structures where all concurrent operations commute, guaranteeing automatic convergence without conflict resolution.
Social Media Like Count
A post has 100 likes. User A likes it (replica 1 says 101). User B likes it at the same time (replica 2 says 101, not knowing about A). Replica 1 replicates to replica 2 and vice versa. With LWW, one write overwrites the other -- the count stays at 101 instead of 102 (a lost update). With a CRDT counter, both increments are preserved during merge, and all replicas converge to 102. The convergence window might be 50ms, but during that window, different users see different counts.
Amazon DynamoDB
DynamoDB's default read consistency is eventually consistent. Reads go to any replica and return whatever value is locally available, typically within 1-2ms. Strongly consistent reads (routed to the leader partition) are available at higher latency (~5-10ms) and double the read cost. For most use cases (product catalog, user preferences, session data), eventually consistent reads provide sufficient freshness with lower latency and cost.
Apache Cassandra
Cassandra provides tunable consistency via per-query consistency levels. A write with CL=ONE and read with CL=ONE is eventually consistent (fastest, highest availability). CL=QUORUM for both reads and writes provides strong consistency (read quorum + write quorum > replication factor). Read-repair runs in the background to fix stale replicas detected during QUORUM reads. Anti-entropy repair (nodetool repair) periodically reconciles all replicas.
Amazon S3
S3 was eventually consistent for overwrite PUTs and DELETEs until December 2020, when Amazon upgraded to strong read-after-write consistency for all operations. Before the upgrade, reading an object immediately after overwriting it could return the old version. The upgrade was achieved by restructuring S3's internal metadata layer, not by switching to synchronous replication -- demonstrating that eventual consistency can sometimes be upgraded to strong consistency through engineering investment.
| Aspect | Description |
|---|---|
| Availability vs Freshness | Eventually consistent systems remain available during partitions and provide low-latency reads from any replica. The cost is that reads may return stale data during the convergence window. For applications where freshness is critical (financial balances, inventory counts), this trade-off is unacceptable without additional guarantees. |
| Write Throughput vs Conflict Rate | Asynchronous replication enables high write throughput because writers do not wait for cross-replica confirmation. But if multiple replicas accept concurrent writes to the same key, conflicts arise and must be resolved. Higher write rates to the same keys increase the conflict rate and the complexity of resolution. |
| Simplicity vs Application Complexity | Eventual consistency is simple for the database to implement -- just replicate asynchronously. But it shifts complexity to the application, which must handle stale reads, out-of-order updates, and conflict resolution. The total system complexity may not decrease; it is merely redistributed. |
| Latency vs Consistency Spectrum | Between eventual consistency and linearizability lies a spectrum: read-your-writes, monotonic reads, causal consistency, bounded staleness. Each provides stronger guarantees at the cost of additional coordination. Choosing the right level for each operation minimizes unnecessary latency while maintaining application correctness. |
Amazon S3's Upgrade from Eventual to Strong Consistency (2020)
Scenario
For its first 14 years, Amazon S3 provided eventual consistency for overwrite PUTs and DELETEs. After uploading a new version of an object, a GET might return the old version for several seconds. This caused problems for data lake workloads (Spark, Hive) that wrote data files and immediately listed or read them. Workarounds included adding delays, using S3Guard (a DynamoDB-backed metadata cache), and structuring workflows to avoid read-after-write patterns.
Solution
Amazon re-architected S3's internal metadata subsystem to provide strong read-after-write consistency for all operations, at no additional cost or performance penalty. The key insight was to make the metadata path strongly consistent (using internal consensus mechanisms) while keeping the data path asynchronous. A PUT is acknowledged only after the metadata is durably committed to a strongly consistent store, so subsequent GETs and LISTs always reflect the latest state.
Outcome
The December 2020 launch eliminated an entire class of bugs for S3 users. Data lake frameworks no longer needed S3Guard or delay hacks. The upgrade was backward compatible -- no API changes, no new consistency options. Importantly, read latency did not increase measurably, disproving the assumption that strong consistency necessarily costs performance. The S3 team estimated that the change required years of internal engineering to achieve without a performance regression.
See Eventual Consistency in action
Explore system design templates that use eventual consistency and run traffic simulations to see how these concepts perform under real load.
Browse Templates1What does eventual consistency guarantee about read values during normal operation?
2Which conflict resolution strategy can silently lose concurrent writes?