Eventual Consistency
A consistency model in which replicas may temporarily disagree but converge after updates stop and propagation succeeds.
Download Markdown (.md)Soroush’s Product Wiki · https://wiki.soroush.uk/topic/eventual-consistency/
01What it means
Eventual consistency allows different copies or derived views of data to return different values for a period after a write. If no new updates occur and communication continues, the copies are expected to converge. It is a specific visibility guarantee, not a promise that every business workflow will correct itself eventually.[1][2]
- 01Write acceptedAuthoritative component records version
- 02Copies divergeSome reads return older state
- 03PropagateReplicas, caches, indexes, consumers
- 04ResolveOrder, merge, or reject conflicts
- 05ConvergeCopies expose the same resulting state
Convergence requires communication to continue and no new updates; business conflicts still need explicit resolution rules.
02Why it matters
Replicated and asynchronous systems can remain responsive and available across delay or partial failure, but users may see stale state, reordered changes, or conflicting actions. Product behavior must make those windows safe and understandable rather than treating them as an invisible infrastructure detail.
03When to use it
Use eventual consistency where temporary staleness is acceptable and availability, geographic distribution, offline work, or asynchronous processing matters more than immediate agreement. Stronger coordination is appropriate for invariants such as preventing double allocation or enforcing a strict balance.
04How it works
- Identify each user and business invariant and define where stale reads are tolerable.
- Accept a write at an authoritative component and record its order or version.
- Propagate the update asynchronously to replicas, indexes, caches, or consumers.
- Resolve concurrent or reordered updates with explicit conflict and merge rules.
- Show pending or provisional states where immediate convergence cannot be assumed.
- Measure replication lag, conflicts, reconciliation failures, and user-visible inconsistency.
05A practical example
A social profile update is accepted in one region and immediately shown back to its author from the authoritative record. Search results in other regions may show the old name briefly, so the interface avoids claiming global completion until indexing catches up.
06Where it breaks
Convergence time may be unbounded during failure, and conflict resolution can discard intent. Users can make decisions from stale data, while developers may accidentally apply eventual behavior to strict invariants. Testing timing-dependent states is difficult.
Common mistakes
- Using eventual consistency as a vague excuse for any delayed or incorrect data.
- Failing to define the authoritative record, convergence path, and acceptable lag.
- Applying it to a business invariant that requires coordinated enforcement.
- Hiding pending state and making users think a propagated change is already universal.
07Sources
- Dynamo: Amazon’s Highly Available Key-value StoreAssociation for Computing Machinery · Peer-reviewed systems paperDynamo: Amazon’s Highly Available Key-value Store
- Data Considerations for MicroservicesMicrosoft Learn · Institutional architecture guideData Considerations for Microservices