CLOUD CONCEPT

Eventual Consistency

Eventual consistency is a distributed-data model in which replicas may temporarily return different values but converge if updates stop and replication completes successfully.

Cloud Concepts Hub →

What is Eventual Consistency

A successful write does not necessarily become visible immediately through every replica or read path. This model supports asynchronous replication and scalable reads, but engineers must account for stale results, replication lag, and possible data loss when failing over to an asynchronous replica.

Eventual consistency allows copies of data to differ temporarily while updates propagate. If no new updates occur and the replication and conflict-resolution mechanisms operate successfully, replicas eventually agree. The model alone does not specify a maximum convergence time, guarantee that a client immediately sees its own writes, or guarantee that successive reads return increasingly recent data.

In a common cloud database architecture, applications write to a primary database while read replicas receive changes asynchronously. The primary can acknowledge a transaction before a replica has applied it. A customer who changes a delivery address and immediately reads from a replica might therefore see the previous address even though the update succeeded. This is stale data, not necessarily a failed transaction.

Read replicas are useful for read-heavy workloads such as product browsing, reporting, and historical dashboards when some staleness is acceptable. Moving these queries away from the writer can reduce contention and improve throughput. Applications generally need to route eligible queries to replica endpoints explicitly or through a suitable routing layer; adding replicas does not automatically distribute every application's reads. Replicas do not directly increase the writer's transaction-processing capacity.

Choose replica capacity and placement according to query load, acceptable lag, latency, and failure-isolation requirements. An undersized replica or a long-running query can delay replication. Additional replicas also incur compute, storage, I/O, and potentially data-transfer costs. Read replicas can be cost-effective compared with scaling a writer solely to serve reads, but they are not automatically the cheapest solution. Measure utilization and replication lag before adding capacity.

For workflows that require immediate visibility, route the relevant read to the authoritative writer or use an explicitly supported strongly consistent read path. After updating an address, for example, the application can read that customer's record from the writer rather than an arbitrary replica. Inventory reservations and financial decisions often require transactions or conditional writes against authoritative state; retrying a stale read alone does not enforce a business invariant. A fixed delay after writing is also not a correctness guarantee because lag varies.

Asynchronous replication also affects disaster recovery. If the primary fails before acknowledged updates reach a replica, promoting that replica can lose those updates. Evaluate this exposure against the recovery point objective, and evaluate detection, promotion, endpoint changes, and client reconnection against the recovery time objective. Planned transitions should wait for replication to catch up when possible. Failover procedures should prevent the old primary from continuing to accept writes independently.

Do not equate a read replica with a synchronous high-availability standby. A standby may exist primarily for automatic failover and may not accept application reads, whereas a read replica commonly serves read scaling and may require a separate promotion workflow. Exact behavior depends on the database and deployment topology. Likewise, eventual consistency is not the same as transaction isolation, and asynchronous replication is a mechanism rather than a complete consistency guarantee. Multi-writer designs additionally need conflict resolution so concurrent updates can converge predictably.

Key aspects of Eventual Consistency

Eventual consistency exchanges immediate agreement across replicas for more flexible replication and read scaling, requiring deliberate freshness, conflict-resolution, cost, and failover decisions.

Convergence rather than immediate agreement

Replicas may temporarily disagree, but they converge after updates stop and replication and conflict resolution complete successfully. Eventual consistency alone provides no fixed deadline for that convergence.

Read scaling with freshness trade-offs

Asynchronous read replicas can offload browsing, reporting, and other stale-tolerant queries from a writer. Route queries deliberately and size replicas to handle both replication work and application reads.

Explicit read-after-write handling

A read immediately after a successful write can return an older value through a replica. Use an authoritative read path or a supported stronger consistency option when the workflow requires immediate visibility.

Lag-aware failover

Promoting an asynchronous replica can lose acknowledged writes that have not reached it. Match replication and failover choices to recovery point and recovery time objectives, and prevent competing writers during recovery.

Operational and cost considerations

Monitor replication lag, replication errors, replica utilization, and query latency. Additional replicas add cost and may improve read throughput, but they do not eliminate writer bottlenecks or guarantee fresher results.

Conflict resolution for multiple writers

When multiple replicas accept writes, concurrent changes need a defined resolution policy. Convergence does not by itself guarantee that the winning value satisfies application rules such as preserving inventory or account balances.

Cloud services for Eventual Consistency

These services illustrate different implementations of replica freshness rather than components that must all be deployed together. RDS read replicas and Aurora readers can offload suitable queries while applications retain writer access for freshness-sensitive workflows. Cross-Region replicas introduce recovery decisions that must account for replication lag and potential data loss. DynamoDB exposes consistency choices through read options and global-table configuration. Across these services, separate read-scaling requirements from high-availability requirements, monitor the relevant replication metrics, and test application behavior during stale reads and failover. Stronger consistency options and replica costs differ by service and topology.

Amazon RDS image Amazon RDS

RDS read replicas generally use asynchronous replication and can return stale data while offloading reads from a source database. Traditional RDS Multi-AZ DB instance deployments instead use synchronous replication to a standby that does not serve application reads; do not confuse this topology with read replicas or Multi-AZ DB clusters.

Open Amazon RDS →
Amazon Aurora image Amazon Aurora

Aurora Replicas share cluster storage, but reader visibility can still lag the writer, so applications must account for stale reads. Aurora Global Database uses asynchronous cross-Region replication; an unplanned cross-Region failover can lose changes that have not reached the secondary Region.

Open Amazon Aurora →
Amazon DynamoDB image Amazon DynamoDB

DynamoDB uses eventually consistent reads by default, while tables and local secondary indexes also support strongly consistent reads; global secondary indexes support only eventually consistent reads. Global tables offer multi-Region eventual consistency and, in supported configurations, multi-Region strong consistency, so verify the selected mode rather than assuming all cross-Region replication behaves identically.

Open Amazon DynamoDB →