← Lessons

quiz vs the machine

Platinum1800

System Design

Read Repair and Hinted Handoff

Two background mechanisms heal replicas that drift apart or miss writes during outages.

6 min read · advanced · beat Platinum to climb

Keeping Replicas in Sync

In an eventually consistent store, replicas can disagree after failures or delayed writes. Two complementary mechanisms quietly bring them back together without a heavy global lock.

Read Repair

When a read touches several replicas and finds they disagree, the system picks the freshest version and writes it back to the stale replicas as a side effect of the read. Popular keys self heal because they are read often, so read repair fixes divergence opportunistically.

Hinted Handoff

When a target replica is down at write time, a healthy node accepts the write and stores a hint describing where it really belongs. When the down node returns, the holder replays the hinted writes to it. This keeps writes available during an outage and lets the recovered node catch up.

Why Both

Read repair fixes drift on data that is read, while hinted handoff covers writes that missed a node entirely. Together with periodic anti entropy comparisons they form a layered approach to convergence.

Key idea

Read repair heals divergent replicas during reads while hinted handoff stores writes for an absent node and replays them on recovery, together driving the cluster toward convergence.

Check yourself

Answer to earn rating on the learn ladder.

1. What does read repair do when replicas disagree on a read?

2. What is the purpose of a hint in hinted handoff?

3. Why are read repair and hinted handoff complementary?