Try
↑ ↓ move↵ openesc close

Interview prep / Quorums

Junior · Quorums · System design interview question

In a leaderless replicated store, what do N, R and W mean?

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

A strong answer

N is the number of replicas that store each item. W is how many replicas must acknowledge a write before the client is told it succeeded. R is how many replicas a read waits for before it returns, taking the newest version among the answers.

The coordinator sends each request to all N replicas and waits for the first W or R replies. So W and R are the two dials. Higher values give stronger guarantees and slower, less available operations. Lower values give faster, more available operations that can return old data.

Take N=3 with R=2 and W=2. With one replica down, both reads and writes still find two live replicas.

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