Scrivio Interview library
ConceptFoundations6 min read · updated 13 November 2026

Quorum systems decide how many replicas must answer each read and write. The choice of N, W and R sets how many replica failures reads and writes survive, and replicas spread over data centers add further levels.

With N = 3 and N = 5, which W and R values give overlapping quorums and how many failed replicas does each tolerate? What do LOCAL_QUORUM and EACH_QUORUM mean with three replicas in each of two data centers?

Reads and writes overlap when W + R > N. For N = 3 that means W = 2 and R = 2, each tolerating one failed replica; for N = 5, W = 3 and R = 3, each tolerating two. In general, 2f + 1 replicas tolerate f failures with majority quorums, which is why even sizes such as N = 4 add cost without adding tolerance. With three replicas in each of two data centers, QUORUM needs four of six and crosses data centers, LOCAL_QUORUM needs two in the coordinator's data center, and EACH_QUORUM needs two in every data center, so LOCAL_QUORUM only guarantees overlap inside one data center.

Why this question is asked

Quorum arithmetic looks like a small formula, but it decides how many failures a system survives, how fast it is, and whether a user can read what they just wrote. Interviewers ask about it because candidates often know W + R > N but cannot say what it buys, what skewed choices cost, or how multiple data centers change the picture. In this answer, we will recap what N, W and R mean, work through N = 3 and N = 5, see why odd sizes are used, look at skewed settings, and then apply it all to two data centers with LOCAL_QUORUM and EACH_QUORUM.

1A Quick Recap of N, W and R

N is the number of replicas that store each key. W is how many of them must acknowledge a write before the client is told it succeeded, and R is how many must answer a read. A write is still sent to all N replicas; W only says when we stop waiting.

The key rule is overlap. If W + R > N, then any set of W replicas and any set of R replicas share at least one replica. So a read always contacts at least one replica that holds the latest successful write, and by picking the newest version among its answers, it returns that write. If W + R is N or less, a read can contact only replicas the write never reached.

2Working Through N = 3 and N = 5

For N = 3, majority quorums are W = 2 and R = 2, and 2 + 2 = 4 > 3. A write succeeds while two replicas are alive, so it tolerates one failed replica; reads likewise. For N = 5, W = 3 and R = 3, and 3 + 3 = 6 > 5. Each tolerates two failed replicas. That is the reason to run five replicas: surviving a planned maintenance and an unplanned failure at the same time.

Quorum choices and the failures they tolerate
NWROverlap?Failures tolerated (writes / reads)
322yes, 4 > 31 / 1
331yes, 4 > 30 / 2
313yes, 4 > 32 / 0
311no, 2 is not > 32 / 2, but reads may be stale
432yes, 5 > 41 / 2
433yes, 6 > 41 / 1
533yes, 6 > 52 / 2

Notice the row for N = 4. A majority of four is three, so W = 3 and R = 3 tolerate only one failure, the same as N = 3, while storing a fourth copy and waiting for one more acknowledgement. In general, a group of 2f + 1 replicas tolerates f failures with majority quorums, and adding one replica to reach an even number buys nothing, which is why replica counts and consensus groups are almost always odd.

3Skewed Choices Move the Risk

We do not have to split evenly. With N = 3, W = 3 and R = 1, reads are as cheap as possible, one replica, and still see every write, but a single dead replica blocks all writes. W = 1 with R = 3 does the opposite: writes always succeed while any replica lives, and reads must contact all three, failing if one is down.

So skewed choices are a way to say which operation must survive failures. A configuration store that is read a thousand times per write might accept fragile writes for fast reads. A logging pipeline might accept slow, fragile reads to never lose a write. For most application data, the balanced majority is the safest default.

4Two Data Centers: QUORUM, LOCAL_QUORUM and EACH_QUORUM

Now take three replicas in each of two data centers, six in total. Cassandra offers several consistency levels that count replicas differently.

Java
-- keyspace with 3 replicas in each data center
CREATE KEYSPACE shop WITH replication =
{'class': 'NetworkTopologyStrategy', 'dc_east': 3, 'dc_west': 3};
-- cqlsh, client connected to dc_east
CONSISTENCY QUORUM; -- 4 of 6 replicas: at least one answer must come from dc_west
CONSISTENCY LOCAL_QUORUM; -- 2 of the 3 replicas in dc_east only
CONSISTENCY EACH_QUORUM; -- writes: 2 of 3 in dc_east AND 2 of 3 in dc_west

QUORUM counts all six replicas, so it needs four. Since one data center holds only three, every QUORUM request must wait for at least one replica in the other data center, paying a cross-data-center round trip, maybe 60 milliseconds, and failing if the link is down. LOCAL_QUORUM counts only the coordinator's data center: two of three, a local round trip, and it keeps working when the other data center is unreachable. EACH_QUORUM requires a local quorum in every data center, so it gives a write that is safely in both places, at the cost of cross-data-center latency and of failing when either data center is unhealthy. It is mainly used for writes; whether reads may use it depends on the version, so check your version.

5What LOCAL_QUORUM Does Not Promise

LOCAL_QUORUM writes and reads overlap only inside one data center. A write at LOCAL_QUORUM in dc_east is guaranteed on two east replicas; the west replicas receive it asynchronously, usually within tens of milliseconds, but possibly much later during network trouble. If the same client's next request is routed to dc_west and reads at LOCAL_QUORUM there, it may not see its own write.

So with LOCAL_QUORUM we keep each user's requests pinned to one data center, and when a user does move, for example on failover, we accept a short window of staleness or read at a stronger level for a while. That is usually a good trade: local latency and survival of a data center outage in exchange for a guarantee that holds per data center.

6Follow-up questions

Why does QUORUM with two data centers cross the link on every request?

Because a majority of six is four, and no single data center holds four replicas. At least one replica in the remote data center must answer every request.

When would you use EACH_QUORUM?

For writes that must survive the loss of a whole data center the moment they are acknowledged, such as an important configuration change or a financial record, where the extra latency and the risk of failing during an outage are acceptable.

Does W + R > N guarantee linearizability?

No. It ensures a read overlaps the last completed write, but writes in progress, failed writes that landed on some replicas and clock-based conflict resolution can still produce anomalies such as a read going backwards. Strict ordering needs consensus, such as Cassandra's lightweight transactions.

7Conclusion

In this answer, we saw that W + R > N makes every read overlap the last successful write. Majority quorums of 2 of 3 or 3 of 5 tolerate one or two failures, 2f + 1 replicas tolerate f failures, and even sizes add cost without tolerance. Skewed choices protect one operation at the expense of the other. With three replicas in each of two data centers, QUORUM needs four replicas and always crosses the link, LOCAL_QUORUM needs two locally, and EACH_QUORUM needs two in each, while LOCAL_QUORUM only guarantees overlap inside one data center.

What to say in the interviewAbout 100 seconds aloud

Open with

Overlap requires W plus R greater than N, so any read set shares at least one replica with the last successful write. For N equals 3, that is W 2 and R 2: each needs two live replicas, so each tolerates one failure.

Then, if they want more

For N equals 5, W 3 and R 3, each tolerating two failures. Generally 2f plus 1 replicas tolerate f failures with majorities, so N equals 4 still tolerates only one failure, like three, while costing more, which is why we use odd sizes.

You can skew it: W equals N with R equals 1 makes reads cheap but any dead replica blocks writes, and W 1 with R equals N is the opposite.

For two data centers with three replicas each, six in total, QUORUM needs four, and since neither data center has four, every request crosses data centers, adding latency and failing if the link is down. LOCAL_QUORUM needs two of the three replicas in the coordinator's data center, so it is local and survives the loss of the other data center.

EACH_QUORUM needs two in every data center for writes, so an acknowledged write is safe in both, at the cost of latency and availability. The catch with LOCAL_QUORUM is that reads and writes only overlap within one data center, so if a client writes in east and then reads in west, it can see stale data until replication catches up.

So I pin users to a data center and accept a short stale window when they move.

About this answer

Last updated
13 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "With N = 3 and N = 5, which W and R values give overlapping quorums and how many failed...": https://scrivio-interview-library.netlify.app/architecture/partitioning-and-replication/21d89a1c42/