What is the difference between QUORUM and ONE consistency levels?
Compare Cassandra QUORUM and ONE consistency levels: latency, availability, fault tolerance, and how QUORUM reads and writes deliver strong consistency.
Expected Interview Answer
ONE requires only a single replica to respond to an operation, giving the lowest latency and highest availability, while QUORUM requires a strict majority of replicas (floor(RF/2)+1) to respond, giving stronger consistency at the cost of higher latency.
With consistency level ONE a read or write completes as soon as any one replica acknowledges, so it is fast and survives many node failures but may return stale data. QUORUM waits for a majority, so pairing QUORUM reads with QUORUM writes satisfies W + R > RF and guarantees a read observes the latest committed write. ONE tolerates more replica outages; QUORUM tolerates fewer but trades that for correctness and agreement.
- ONE offers the lowest latency and best availability
- QUORUM enables strong consistency when used for both reads and writes
- ONE keeps working even when most replicas are down
- QUORUM prevents stale reads by requiring majority agreement
- Choice can be made per query to fit each workload
AI Mentor Explanation
Deciding a close catch with ONE is like accepting the nearest fielder's word and moving on instantly, quick but occasionally wrong. QUORUM is like waiting for the majority of on-field and TV umpires to agree before signalling out; it takes longer yet the decision is far more trustworthy and rarely overturned later.
Step-by-Step Explanation
Step 1
Recall the replication factor
Both levels are relative to RF, the number of replicas per row; QUORUM is defined as floor(RF/2)+1.
Step 2
Understand ONE
The operation succeeds after a single replica responds, minimizing latency and maximizing availability.
Step 3
Understand QUORUM
The operation waits for a majority of replicas, so responses reflect broader agreement.
Step 4
Compare fault tolerance
ONE survives up to RF-1 replicas being down; QUORUM needs a majority alive to succeed.
Step 5
Combine for guarantees
QUORUM reads plus QUORUM writes satisfy W + R > RF, ensuring reads see the latest write, unlike ONE+ONE.
What Interviewer Expects
- Definition of QUORUM as floor(RF/2)+1
- ONE prioritizes latency and availability over freshness
- How QUORUM+QUORUM yields strong consistency
- Fault-tolerance differences between the two levels
- That the level is chosen per query for the workload
Common Mistakes
- Believing QUORUM means all replicas respond
- Assuming ONE always returns the newest data
- Forgetting the W + R > RF requirement for strong reads
- Thinking ONE and QUORUM differ in stored data rather than acknowledgements
- Ignoring that QUORUM reduces the number of tolerable outages
Best Answer (HR Friendly)
“ONE means Cassandra is happy once a single copy of the data answers, which is fast but might be slightly out of date. QUORUM means it waits for a majority of copies to agree, which is a bit slower but much more likely to give you the very latest, correct value.”
Code Example
-- ONE: lowest latency, may be stale
CONSISTENCY ONE;
SELECT * FROM orders WHERE id = 100;
-- QUORUM: majority must agree, stronger consistency
CONSISTENCY QUORUM;
SELECT * FROM orders WHERE id = 100;Follow-up Questions
- How is QUORUM calculated for RF=5?
- What is the difference between QUORUM and LOCAL_QUORUM?
- When would you deliberately choose ONE over QUORUM?
- How do ONE and QUORUM combine to give strong consistency?
- What happens to QUORUM if a majority of replicas are down?
MCQ Practice
1. For RF=3, how many replicas must respond at QUORUM?
QUORUM is floor(3/2)+1 = 2 replicas, a strict majority of the three copies.
2. Which statement about ONE is correct?
ONE completes once a single replica responds, giving the lowest latency and best availability but possible staleness.
Flash Cards
What does ONE require? — A single replica to acknowledge the operation; lowest latency and highest availability, but possibly stale.
What does QUORUM require? — A strict majority of replicas, floor(RF/2)+1, to acknowledge the operation.
How do you get strong consistency? — Use QUORUM for both reads and writes so W + R > RF.
QUORUM for RF=5? — floor(5/2)+1 = 3 replicas.