← Lessons

quiz vs the machine

Gold1400

Databases

Eventual Consistency in NoSQL Reads

Many distributed stores let reads return slightly stale data so the system stays available and fast.

5 min read · core · beat Gold to climb

What Eventual Consistency Means

In a distributed store, a write may be accepted on one replica and copied to others a moment later. Eventual consistency means that if writes stop, all replicas will converge to the same value, but for a brief window a read can return stale data from a replica that has not caught up.

Why Systems Choose It

  • It keeps the system available even when replicas are slow or partitioned.
  • Reads can be served from the nearest replica for low latency.
  • It avoids the coordination cost of making every read see the very latest write.

The Tradeoff in Practice

A user who updates a profile then reloads might briefly see the old value if the read hits a lagging replica. This is the same read your own writes problem seen in replication, now built into the consistency model.

Tools to Manage It

  • Choose strong reads for the few operations that cannot tolerate staleness.
  • Route a user to a replica that has seen their write when freshness matters.
  • Design features so brief staleness is harmless, like a like count that settles.

Key idea

Eventual consistency trades momentary staleness for availability and low latency, so reads may return old data until replicas converge.

Check yourself

Answer to earn rating on the learn ladder.

1. What does eventual consistency guarantee?

2. Why do systems accept eventual consistency?