# Eventual Consistency

A consistency model in which replicas may temporarily disagree but converge after updates stop and propagation succeeds.

- Type: principle
- Domain: Engineering & architecture
- Level: Intermediate
- Last reviewed: 2026-09-24
- Original: [Soroush’s Product Wiki](<https://wiki.soroush.uk/topic/eventual-consistency/>)

## What 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.

## Why 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.

## When 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.

## How it works

1. Identify each user and business invariant and define where stale reads are tolerable.
2. Accept a write at an authoritative component and record its order or version.
3. Propagate the update asynchronously to replicas, indexes, caches, or consumers.
4. Resolve concurrent or reordered updates with explicit conflict and merge rules.
5. Show pending or provisional states where immediate convergence cannot be assumed.
6. Measure replication lag, conflicts, reconciliation failures, and user-visible inconsistency.

## A 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.

## Where 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.

## Visualization

[View the visualization on the website](<https://wiki.soroush.uk/topic/eventual-consistency/#visualization-eventual-consistency>)

## Sources

1. [Dynamo: Amazon’s Highly Available Key-value Store](<https://www.allthingsdistributed.com/files/amazon-dynamo-sosp2007.pdf>) — Association for Computing Machinery · Peer-reviewed systems paper
2. [Data Considerations for Microservices](<https://learn.microsoft.com/en-us/azure/architecture/microservices/design/data-considerations>) — Microsoft Learn · Institutional architecture guide

## Related topics

- [Event-Driven Architecture](<https://wiki.soroush.uk/topic/event-driven-architecture/>)
- [Cache](<https://wiki.soroush.uk/topic/cache/>)
- [Database Transaction](<https://wiki.soroush.uk/topic/database-transaction/>)
