← Lessons

quiz vs the machine

Gold1440

System Design

Monotonic Reads

Preventing time from appearing to run backward when reads bounce between replicas.

4 min read · core · beat Gold to climb

Going back in time

Imagine reading a comment thread. Your first read hits an up to date replica and you see a new reply. Your second read lands on a lagging replica and the reply disappears. Data seemed to move backward in time. This is confusing and erodes trust.

The guarantee

Monotonic reads promise that once you have seen a value, you will never later see an older version of it. Reads only move forward in time, never backward, for a given user.

How to provide it

  • Pin each user to a single replica so they read a consistent timeline.
  • Or track the highest version a user has seen and route them only to replicas at least that current.

Monotonic reads is weaker than read your own writes. It does not require seeing the newest data, only that you never regress to staler data than you already observed.

Key idea

Monotonic reads ensure a user never sees data go backward by pinning them to one replica or to replicas at least as current as what they already saw.

Check yourself

Answer to earn rating on the learn ladder.

1. What does monotonic reads prevent?

2. A simple way to provide monotonic reads is to