Course contentsShow
← System Design
Lesson 543 of 1,91915. Consistency ModelsFree lesson

Monotonic Reads Consistency

Ensuring that once a client reads a value, subsequent reads never return older values.

Monotonic Reads Consistency

What You'll Learn

You'll learn how Monotonic Reads Consistency prevents clients from seeing data go "backwards in time" during repeated reads in a distributed system.


The Core Idea

Monotonic Reads Consistency guarantees that once a client reads a particular version of data, all future reads by that same client will return that version or a newer one—never an older version. This prevents the confusing scenario where you see an update, refresh, and then the update has "disappeared."

Why This Matters

In distributed systems with multiple replicas, different servers might have different versions of the same data at any given moment. Without monotonic reads, your application might read from replica A (which has recent data), then read from replica B (which is lagging behind), creating the illusion that data has regressed.

A Real-World Analogy

Imagine checking your bank balance on your phone and seeing 500afterarecentdeposit.Fiveminuteslater,youcheckagainandsee500 after a recent deposit. Five minutes later, you check again and see 400 (the old balance before the deposit). You'd panic! Monotonic reads prevents this time-traveling confusion by ensuring once you see $500, you'll never see anything older than that.

How Systems Achieve This

The typical approach is session affinity or sticky sessions: route all reads from the same client to the same replica. If that replica fails, the system tracks which version the client last saw (using version vectors or timestamps) and routes them to a replica that's at least as up-to-date.

This is weaker than Read-Your-Writes Consistency (which guarantees you see your own writes) but stronger than pure Eventual Consistency (which makes no guarantees about read ordering).


Key Takeaway: Monotonic Reads Consistency ensures clients never experience time going backwards—once you've seen version N, you'll never see anything older than N, even if you read from different replicas.