Scrivio Interview library
ConceptFoundations6 min read · updated 12 November 2026

Explain Cassandra consistency levels ONE, QUORUM, LOCAL_QUORUM and ALL with a replication factor of 3. When are reads guaranteed to see the latest write?

A consistency level, chosen per request, says how many replicas must acknowledge a write or answer a read. With a replication factor of 3, ONE needs 1 replica, QUORUM needs 2, ALL needs 3, and LOCAL_QUORUM needs 2 replicas in the local data center only. A read is guaranteed to see the latest successful write when the read and write replica counts together exceed the replication factor (R + W > N), for example QUORUM writes with QUORUM reads; ONE with ONE is fast but can return stale data, and conflicting writes are settled by last write wins on timestamps.

Why this question is asked

Tunable consistency is Cassandra's most distinctive feature and the one most often misconfigured. A service can be fast and highly available, or guaranteed to read its own writes, and the choice is made on every single request, often by a default nobody remembers setting. Interviewers ask this to check that we can reason about the overlap rule and explain when a read is stale. In this answer, we will recap replicas and consistency levels, work out what each level means with three replicas, derive the R + W > N rule, look at the trade-offs, and see how conflicts are resolved with timestamps.

1A Quick Recap: Replicas and the Coordinator

With a replication factor (RF) of 3, Cassandra stores every partition on three nodes. When a client sends a request, the node it talks to becomes the coordinator for that request. For a write, the coordinator sends the mutation to all three replicas. For a read, it asks enough replicas to satisfy the request, typically the fastest ones.

The consistency level tells the coordinator how many replicas must respond before it reports success to the client. Importantly, a write at ONE is still sent to all three replicas; ONE only means the coordinator replies after the first acknowledgement, and the other replicas receive it a moment later, or later through repair if they were down.

2What Each Level Means With RF 3

ONE waits for one replica, so it tolerates two replicas being down and has the lowest latency. QUORUM waits for a majority of all replicas across all data centers, floor(RF / 2) + 1, which is 2 for RF 3. ALL waits for all three and fails if any one is unavailable. LOCAL_QUORUM is a majority of the replicas in the coordinator's own data center, so with RF 3 per data center it is 2 local replicas, and it never waits for a remote data center.

Consistency levels with RF 3
LevelReplicas neededSurvives replicas downTypical use
ONE12Logs, metrics, best effort
QUORUM2 (of all DCs)1Single DC, strong reads
LOCAL_QUORUM2 in local DC1 per DCMulti-DC default
ALL30Rarely; fails on any outage

Notice that QUORUM in a two-data-center cluster with RF 3 in each means 4 of 6 replicas, which forces cross-region round trips. That is why multi-data-center applications almost always use LOCAL_QUORUM instead.

3When Does a Read See the Latest Write?

Think of the replicas as three boxes. A successful write at level W has definitely reached W of them. A read at level R asks R of them and returns the value with the newest timestamp. If R + W is greater than N, the replication factor, the set read and the set written must share at least one replica, so the read is guaranteed to include the newest value.

Java
-- RF = 3, replicas r1, r2, r3
-- write at QUORUM (W = 2) reaches r1, r2; r3 still has the old value
-- read at QUORUM (R = 2) asks any two: {r1,r2} {r1,r3} or {r2,r3}
-- each pair contains r1 or r2 -> newest value returned 2 + 2 > 3 -> consistent
-- write at ONE (W = 1) reaches r1 only
-- read at ONE (R = 1) asks r3 1 + 1 = 2 -> stale value
-- write at ONE, read at ALL (R = 3) 1 + 3 > 3 -> consistent, but fragile
Step throughQUORUM write then QUORUM read, RF 3
ClientCoordinatorr1r2r3
write x=7 at QUORUM
mutation
mutation
mutation (slow)
ack
ack
success after 2 acks
read x at QUORUM
read
read
x=7 (newest timestamp from r2)

11 messages in order. Play them, or step through them one at a time.

Any two replicas include at least one that has the write.

So QUORUM writes with QUORUM reads, or LOCAL_QUORUM with LOCAL_QUORUM within one data center, give read-your-writes. ONE writes with ALL reads would also overlap, but any single node outage would make every read fail, which is why the balanced combination is the usual choice.

There is one subtlety: the guarantee is about successful writes. If a QUORUM write times out after reaching only one replica, the client gets an error, but the value may still appear later, so a timeout means unknown, not failed.

4The Trade-offs in Practice

ONE for both reads and writes is fast and stays available even with two replicas down, which suits data where a slightly stale answer is fine: page view counters, logs, recommendations. But a user who updates a setting and refreshes may see the old value, because the read hit a replica that has not received the write yet.

ALL gives the strongest reads but sacrifices availability: a rolling restart of one node makes all ALL requests fail. QUORUM or LOCAL_QUORUM for both is the common middle ground, tolerating one replica down per data center while guaranteeing overlap. In the DataStax Java driver we set the default in application.conf with basic.request.consistency = LOCAL_QUORUM and override it per statement where needed.

5Resolving Conflicts With Timestamps

Cassandra has no leader that orders writes. Each write carries a timestamp, by default set by the client driver or coordinator in microseconds, and when replicas hold different values for the same cell, the one with the highest timestamp wins. This is last write wins, applied per column, not per row.

The catch is clocks. If two application servers write the same cell and one server's clock is 200 ms ahead, its earlier write can carry the later timestamp and silently beat a write that really happened after it. So we keep clocks synchronised with NTP and, for read-modify-write logic where concurrent updates matter, use lightweight transactions or a design that avoids overwriting, such as append-only rows.

6Follow-up questions

What are read repair and hinted handoff?

Both help replicas converge. Hinted handoff works on writes: if a replica is down when a write arrives, the coordinator stores a hint, the missed mutation, and replays it when the replica comes back, for up to max_hint_window (three hours by default). Read repair works on reads: when a read at QUORUM finds that replicas disagree, the coordinator returns the newest value and writes it to the stale replicas it contacted. Neither replaces regular anti-entropy repair with nodetool repair, which compares all data between replicas and fixes what hints and reads missed.

Does QUORUM make Cassandra linearizable?

No. Overlapping quorums give read-your-writes for successful writes, but concurrent writes still resolve by timestamp, and a read during an in-flight write can see either value. For compare-and-set semantics we need lightweight transactions with IF conditions, which use Paxos at SERIAL or LOCAL_SERIAL consistency.

Should we ever use EACH_QUORUM?

EACH_QUORUM requires a quorum in every data center for a write. It gives strong cross-region durability for critical writes, at the cost of cross-region latency and failure when any data center is unreachable, so it is used sparingly.

7Conclusion

In this answer, we saw that a consistency level is the number of replicas that must respond per request: with RF 3, ONE is 1, QUORUM is 2, ALL is 3, and LOCAL_QUORUM is 2 in the local data center. Reads see the latest successful write when R + W > N, as with QUORUM on both sides, while ONE with ONE is fast but can be stale and ALL fails on any outage. Conflicts are settled by last write wins on timestamps, so clock synchronisation matters.

What to say in the interviewAbout 90 seconds aloud

Open with

The consistency level is chosen per request and says how many replicas must acknowledge a write or answer a read before the coordinator replies. The write is still sent to all replicas; the level only decides how many it waits for.

Then, if they want more

With replication factor 3, ONE means one replica, QUORUM means a majority, two, ALL means all three, and LOCAL_QUORUM means two replicas in the local data center, without waiting for other regions.

The rule for reading the latest write is R plus W greater than N: if the replicas I read and the replicas that acknowledged the write must overlap, at least one returns the newest value, and the coordinator picks the highest timestamp.

So QUORUM writes with QUORUM reads, or LOCAL_QUORUM for both in one data center, give read-your-writes and still tolerate one replica down. ONE with ONE is the fastest and most available, but a read can hit a replica that has not received the write yet, so it can be stale.

ALL gives overlap with anything but fails as soon as one replica is down. One more thing I would mention is conflict resolution: Cassandra uses last write wins per cell based on timestamps, so clock skew between clients can make a later write lose. Keeping NTP in sync and using lightweight transactions for conditional updates handles that.

About this answer

Last updated
12 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 documentation below. 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 "Explain Cassandra consistency levels ONE, QUORUM, LOCAL_QUORUM and ALL with a...": https://scrivio-interview-library.netlify.app/databases/cassandra-and-dynamodb/ea8b9d48b2/