Course contentsShow
← Cloud and Infrastructure
Lesson 117 of 2,9893. Storage PrimitivesFree lesson

Storage Consistency Models

Learn about eventual consistency, strong consistency, and read-after-write consistency in distributed storage systems.

Storage Consistency Models

What you'll learn: You'll understand the trade-offs between different consistency guarantees when reading and writing data in distributed storage systems.

What Is Consistency?

When your data lives across multiple servers or regions, consistency defines what you see when you read data that was just written—either by you or someone else. Think of it like updating your social media status: does everyone see your new post instantly, or might some friends see the old version for a few seconds?

Three Key Consistency Models

Strong Consistency

Every read receives the most recent write, guaranteed. If you update a file and immediately read it (even from another region), you always get the latest version. This is the safest but slowest model because all copies must agree before confirming your write.

Analogy: Like a single notebook everyone must pass around—only one person can write at a time, but everyone always sees the latest entry.

Eventual Consistency

After a write, reads might return old data temporarily, but all copies eventually sync up. This model is faster because writes don't wait for global agreement. Object storage often uses this model.

Analogy: Like group chat—your message sends instantly, but friends might see it at slightly different times depending on their connection.

Read-After-Write Consistency

You always see your own writes immediately, but others might see old data briefly. This balances user experience with performance—you won't be confused by seeing stale data you just changed.

Analogy: Your diary updates instantly for you, but if your friend reads it, they might see yesterday's entry for a moment.

Choosing the Right Model

Strong consistency suits financial systems where accuracy matters more than speed. Eventual consistency works for social media feeds or content delivery where slight delays are acceptable but global scale is essential.

Key Takeaway: Consistency models represent a trade-off between data accuracy guarantees and system performance—strong consistency is accurate but slow; eventual consistency is fast but temporarily imprecise.