Try
↑ ↓ move↵ openesc close

Interview prep / Quorums

Mid · Quorums · System design interview question

Explain read repair and anti-entropy. Why do leaderless stores need both?

Sketch your own answer first, then compare it with the one below.

A strong answer

A replica that missed a write stays behind until something corrects it. Read repair does this during reads. When a read sees replicas return different versions, it writes the newest value back to the ones that were behind. It is cheap, because the read already has the data, and it heals popular items quickly.

Read repair only heals what is read. An item nobody reads can stay inconsistent for a long time, and a replica that was down for hours misses many writes. Anti-entropy is a background process that compares replicas, often with hash trees to find differences without sending all data, and copies what is missing.

Neither is enough alone: read repair misses cold data, and anti-entropy is too slow for hot data. Both rely on telling which version is newer, by timestamp or version vector.

Sources

Learn it by running it

The quorums lesson explains the mechanism behind this question, and its lab lets you change the parameters and watch the effect.

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms