System design concepts · Consistency and concurrency control

Strong vs Eventual Consistency

Short answer

Strong consistency, usually meaning linearizability, guarantees that once a write completes, every later read from any client or replica returns that value or a newer one, so the system behaves as if there were a single copy of the data. Eventual consistency only guarantees that if writes stop, all replicas will converge to the same value; in the meantime a read can return stale data. Strong consistency costs latency, because replicas must coordinate before a write is acknowledged, and during a network partition part of the system has to refuse requests. Eventual consistency keeps reads and writes fast and available, and pushes the job of tolerating staleness or merging conflicts onto the design. Use strong consistency for money, inventory and uniqueness, and eventual consistency for feeds, counters, caches and anything where a short delay is harmless.

Read the video transcript

A user updates their profile in one region. A moment later, someone reads it from another. Which version do they see? With eventual consistency, one replica acknowledges the write, and copies it to the others in the background. It's fast, and it stays available. But during that lag, a read from a replica that hasn't caught up returns the old value. If writes stop, every replica converges. Until then, reads can be stale. Strong consistency doesn't acknowledge the write until the leader, or a quorum, has it. Every later read sees that value or a newer one, as if there were a single copy. That costs a round of coordination on every write, which hurts across regions. And during a network partition, the side without a majority has to refuse requests. Leaderless stores let you tune it. With three replicas, write to two and read from two, and every read quorum includes a replica that has the latest write. So choose per piece of data. Balances, seats and usernames need strong consistency. Likes, feeds and view counts can be eventual.

Strong vs Eventual Consistency: comparison table

AspectStrong consistencyEventual consistency
GuaranteeA read sees the latest completed writeReplicas converge if writes stop; reads may be stale until then
Write pathCoordinate with a leader or a quorum before acknowledgingAcknowledge on one replica and replicate in the background
LatencyHigher, especially across regionsLower
During a network partitionThe side without a majority rejects requestsBoth sides keep serving and reconcile later
ConflictsPrevented by ordering writes through a leader or consensusResolved after the fact: last write wins, version vectors, CRDTs or app logic
ExamplesSpanner, etcd, reads from a single-leader primaryDNS, CDN caches, async read replicas, DynamoDB default reads
Good fitBalances, seat inventory, unique usernames, locksLikes, view counts, feeds, reviews, search indexes

When to use each

Require strong consistency when

  • A stale read leads to a wrong action: overspending a balance, selling one seat twice, granting a lock to two holders.
  • A value must be unique across the system, like a username or an idempotency key.
  • Users would see a visible contradiction they cannot explain, such as a payment that disappears after refresh.

Accept eventual consistency when

  • A few seconds of staleness is invisible or harmless, as with like counts and follower counts.
  • Availability and low latency matter more than exactness, especially across regions.
  • The data is derived and can be rebuilt, such as caches, search indexes and timelines.
The verdict

Require strong consistency when

A stale read leads to a wrong action: overspending a balance, selling one seat twice, granting a lock to two holders.

Otherwise

Accept eventual consistency when

A few seconds of staleness is invisible or harmless, as with like counts and follower counts.

There are useful models in between

Real systems often need something weaker than linearizable but stronger than "eventually". Read-your-writes means a user always sees their own updates, which you can get by routing that user's reads to the leader for a short time after a write. Monotonic reads means a user never sees data go backwards, which you can get by pinning them to one replica. Causal consistency means a reply is never visible before the message it answers.

Read-your-writes: the writer reads from the leader while the replica catches up.

These session guarantees fix most user-visible oddities at a fraction of the cost of strong consistency everywhere.

Quorums make the trade-off tunable

Leaderless stores such as Cassandra let you choose, per request, how many of the N replicas must answer a write (W) and a read (R). When R + W > N, every read quorum overlaps the replicas that took the latest write, so reads usually see it. That overlap alone is not full linearizability under concurrent writes and failures, but it moves the dial toward fresher reads at the cost of latency and availability.

Three W and R settings, and whether the read quorum overlaps the write.
Interview angle

How it comes up in a system design interview

Strong interview answers do not pick one model for the whole system. They go through the data and choose per item: the balance is strongly consistent, the transaction history can lag a little, and the notification badge is eventual. Saying why for each one shows you understand the cost.

Where you will meet it

  • Two people book the last seat at the same moment. Which store enforces that only one succeeds, and how?
  • A user posts a photo and refreshes. Why might it be missing, and how do you guarantee they see it?
  • How does a distributed counter stay fast at high write rates if it does not need to be exact?
  • In a key-value store, what do R, W and N mean and how would you set them for this workload?
How a strong answer sounds
“The wallet balance needs strong consistency, so it lives on a single-leader database and every debit is a conditional update in a transaction. The activity feed and the notification count are eventually consistent: they are built from events and can lag a second or two without anyone noticing. For the user's own posts I would add read-your-writes by reading from the leader just after they post.”

Common mistakes

  • Treating eventual consistency as "sometimes wrong forever". It converges; the question is how stale reads affect users in the meantime.
  • Asking for strong consistency everywhere and paying the latency on data that never needed it.
  • Confusing the C in ACID (constraints hold) with the C in CAP (linearizability across replicas).

Frequently asked questions

How does this relate to the CAP theorem?

CAP says that during a network partition a replicated system must choose between consistency (linearizability) and availability. Strongly consistent systems reject some requests during a partition; eventually consistent systems keep serving and reconcile later.

What is read-your-writes consistency?

A guarantee that a user always sees their own writes, even if other users might see them a little later. It is a common middle ground that fixes the most visible staleness bugs.

Is DynamoDB strongly consistent?

Reads are eventually consistent by default. You can request strongly consistent reads per call within a region, at higher cost and latency.

Is eventual consistency acceptable for payments?

Not for the balance itself or the decision to approve a debit. Downstream views such as statements, analytics and notifications can be eventually consistent.

Learn and practise

Lessons

Problems where this choice matters

Knowing the trade-off is half of it

Practise saying it under follow-up questions: a timed system design interview with an AI interviewer that probes your choices and grades against a rubric.

Start a mock interview