What Is Eventual Consistency? Examples and How Systems Achieve It

Eventual consistency is a guarantee about replicas, the copies of one piece of data kept on different servers. If writes to that data stop, every replica will eventually return the same value. Until that moment, a read may return an older value than the one just written. "Eventually" has no fixed bound. Most systems converge within milliseconds to a few seconds, while DNS can take an hour or more.

Systems accept this because the alternative is expensive. A write that must reach every replica before it is confirmed costs a network round trip per replica. It also fails if any replica is unreachable. An eventually consistent system confirms the write once one replica, or a small number, has it. The rest is done in the background, so writes stay fast and the system keeps answering during a network partition.

Everyday examples

DNS record propagation. When you change a domain's address record, resolvers around the world keep the old record until its TTL runs out. The TTL (time to live) is the number of seconds a cached record stays valid. With a 3,600-second TTL, a resolver that cached the old address a minute ago serves it for another 59 minutes. Two users in different cities can reach different servers for up to an hour.

A like count that differs by region. A social network keeps a copy of a post's counter in each region. Increments are applied locally and shipped to the other regions a moment later. A user in Singapore may see 1,204 likes while a user in Frankfurt sees 1,198. A few seconds later both see the same number.

Shopping carts in Dynamo-style stores. Amazon's Dynamo design accepted writes to a cart on any replica, even during a partition. When two versions of the same cart met, the store merged them by taking the union of their items. An added item was never lost, although a deleted item could reappear.

Object storage across regions. Amazon S3 cross-region replication copies each new object to the second region asynchronously. Most objects arrive within 15 minutes. An object uploaded in one region may therefore not exist yet when read from the other.

How systems achieve it

Read repair. On a read, the coordinator node asks several replicas for the value. If the answers differ, it returns the newest to the client and writes that value back to the replicas that were behind. Cassandra and other Dynamo-style stores do this, so every read of a stale key also fixes it.

Anti-entropy with Merkle trees. Anti-entropy is a background process that compares two replicas and repairs every difference. A Merkle tree is a tree of hashes: each leaf covers a range of keys, and each parent hashes its children. Two replicas compare root hashes and descend only into the subtrees that differ. Cassandra's repair command works this way. A replica holding millions of keys can find a handful of differences by exchanging a few thousand hashes.

Hinted handoff. When a replica is down, another node accepts the write on its behalf and stores a hint. A hint is a record saying which write the absent replica still owes. When the replica returns, the hint is replayed to it. Cassandra keeps hints for 3 hours by default; a replica that is away longer needs a full repair.

Gossip protocols. Each node periodically exchanges what it knows with a few random peers, once per second in Cassandra. Those peers pass it on in the next round. Information about membership, failures, and schema reaches every node in about log2(N) rounds, so about 10 rounds for 1,000 nodes.

Vector clocks and version vectors. A version vector is a list of (replica, counter) pairs attached to each value. Each replica increments its own counter when it writes. Comparing two vectors tells you whether one version descends from the other. If neither does, the two were written at the same time on different replicas, which is a conflict. Riak and the original Dynamo used them to detect such conflicts and hand both versions to the application to merge.

CRDTs. A conflict-free replicated data type is a data structure whose merge rule gives the same result whatever order replicas merge in. A grow-only counter keeps one count per replica and sums them. An add-wins set keeps an item if any replica added it after the last delete. Riak data types and collaborative editors use CRDTs, so replicas converge with no manual conflict resolution at all.

Strong versus eventual, in one paragraph

Strong consistency guarantees that every read returns the latest confirmed write. Systems achieve it by routing all writes through one leader, or by waiting for a quorum, a majority of replicas, before confirming. That adds latency and refuses requests when a majority is unreachable. The two models are compared side by side in What is Strong vs Eventual Consistency?. Why a database must choose during a partition is explained in What is the CAP theorem and what trade-offs does it imply for distributed databases?. The NoSQL model built on this choice is described in What is the BASE consistency model?.

How to talk about it in the interview

Name the data that tolerates it and the data that cannot. Feeds, like counts, view counts, recommendations, search indexes, and notification badges tolerate it. A reader who sees a value a few seconds old loses nothing. Account balances, inventory at checkout, unique usernames, and seat reservations cannot. A stale read there lets two people take the same thing.

Then say the mechanism and the window. "The feed is eventually consistent; replicas converge through read repair and hinted handoff, usually within a second". That sentence shows the interviewer that you chose the model for a reason and know how the system delivers it.

How to Prepare

  • Explain each of the six mechanisms in two sentences from memory. Interviewers ask "how does it become consistent" more often than "what does it mean".
  • Sort a list of ten data types into tolerates and cannot tolerate, and give the one-line reason for each.
  • Give a number for the convergence window whenever you say eventual, such as "under a second inside a region".
  • Study the consistency chapters in Grokking System Design Fundamentals, which cover consistency models, quorums, and replication with diagrams.
  • Apply the model in full designs with Grokking the System Design Interview, where the feed, the counter, and the checkout each get the model they need.
TAGS
System Design Fundamentals
CONTRIBUTOR
Arslan Ahmad
Arslan Ahmad
ex-FAANG engineering manager and author or Grokking series.

GET YOUR FREE

Coding Questions Catalog

Design Gurus Newsletter - Latest from our Blog
Boost your coding skills with our essential coding questions catalog.
Take a step towards a better tech career now!
Explore Answers
What is Read-Through vs Write-Through Cache?
What Is the Difference Between Weak and Strong Scaling?
Strong scaling keeps the problem fixed and adds processors to finish sooner. Weak scaling grows the problem with the processors to keep the time constant. Here are the definitions, the formulas, and a worked example of each.
What to Expect in the Jane Street System Design Interview
Jane Street rarely runs a classic system design round. Here is what replaces it, the systems thinking they evaluate inside coding rounds, and how senior candidates should prepare.
At-Least-Once vs At-Most-Once vs Exactly-Once: Where to Use Each?
At most once can drop a message, at least once can repeat one, and exactly once costs coordination. Here is what each guarantee promises, what it costs, and which flows in a real system need which one.
What is mTLS and When to Use It?
Learn what mTLS (Mutual TLS) is, when to use it in backend systems, why it matters, and how to discuss it in interviews. Includes examples, trade-offs, and pitfalls.
What are the differences between horizontal and vertical partitioning in a database?
Related Courses
New
Grokking the AI System Design Interview course cover
Grokking the AI System Design Interview
Learn to design AI systems the way interviewers expect: classic ML products, LLM and RAG architectures, and agentic systems, all through the lens of the system design interview.
4.6
(3,192 learners)
Discounted price for Your Region

$99

Grokking the Coding Interview: Patterns for Coding Questions course cover
Grokking the Coding Interview: Patterns for Coding Questions
The 24 essential patterns behind every coding interview question. Available in Java, Python, JavaScript, C++, C#, and Go. The most comprehensive coding interview course with 543 lessons. A smarter alternative to grinding LeetCode.
4.6
Discounted price for Your Region

$197

Grokking Modern AI Fundamentals course cover
Grokking Modern AI Fundamentals
Master the fundamentals of AI today to lead the tech revolution of tomorrow.
4.1
Discounted price for Your Region

$72

Design Gurus logo
One-Stop Portal For Tech Interviews.
About Us
Our Team
Careers
Partners
Contact Us
Become Affiliate
Copyright © 2026 Design Gurus, LLC. All rights reserved.