Course contentsShow
← Computer Science
Lesson 2614 of 2,87258. Distributed Systems BasicsFree lesson

Eventual Consistency Overview

Learn eventual consistency: all replicas converge to the same value given enough time without updates.

Eventual Consistency Overview

What you'll learn: You'll understand how distributed systems ensure all replicas eventually agree on data values without requiring immediate, strict coordination.

What Is Eventual Consistency?

Eventual consistency is a relaxed consistency model where replicas in a distributed system don't immediately synchronize after every write. Instead, the system guarantees that if no new updates occur, all replicas will eventually converge to the same value given enough time.

Think of it like updating your social media status: when you post, not all your friends see it instantly. Some might see it seconds later, others minutes later depending on their location and network. But eventually—assuming no new posts—everyone sees the same final update.

How It Works

In an eventually consistent system:

  1. Writes succeed immediately on one or more nodes without waiting for all replicas
  2. Updates propagate asynchronously in the background
  3. Temporary inconsistencies are tolerated—different replicas may return different values for a short period
  4. Convergence happens over time as updates spread through the system

Why Use Eventual Consistency?

This model prioritizes availability and partition tolerance (the "AP" in CAP theorem). Systems remain responsive even during network partitions or high latency. Popular examples include:

  • DNS (Domain Name System)
  • Shopping cart systems (Amazon's Dynamo)
  • Social media feeds
  • Distributed caches

The Trade-Off

You sacrifice strong consistency (immediate agreement) for better performance and availability. Applications must tolerate stale reads and potential conflicts when concurrent updates occur to the same data.

Key Takeaway: Eventual consistency allows distributed systems to remain highly available by accepting temporary inconsistencies, guaranteeing only that all replicas will converge to the same value once updates stop flowing.