QA
Intermediate LevelSystem Design & Architecture

What are Quorum Reads and Writes ($R + W > N$) in distributed databases?

❓ Interview Prompt: Explain Quorum Consistency in Cassandra/DynamoDB, Replication Factor ($N$), Read Quorum ($R$), Write Quorum ($W$), and Strong Consistency formulas.

In distributed masterless databases (Cassandra), consistency is tunable using Quorum Reads and Writes:

Quorum Formula:

β€’
$N$: Replication Factor (Total node copies).
β€’
$W$: Write Quorum (Number of nodes that must acknowledge a write).
β€’
$R$: Read Quorum (Number of nodes responding to a read).
β€’
Strong Consistency Condition: If $R + W > N$, the read and write quorums overlap on at least 1 node, guaranteeing the client always reads the latest written value!

Code Implementation Example

sql
-- Executing Quorum Read in Cassandra CQL
CONSISTENCY QUORUM;
SELECT * FROM user_profiles WHERE id = 'user_100';
πŸ’‘Setting QUORUM consistency level in Cassandra.
🎯 Interview Key Takeaway

Configure R + W > N in distributed databases to achieve Strong Consistency across quorum node overlaps.

#System Design#Quorum#Cassandra#Consistency#Intermediate
Back to all System Design & Architecture Questions→

More System Design & Architecture Interview Questions

Beginner LevelSystem Design & Architecture

Explain the CAP Theorem and PACELC Theorem with real-world database examples.

Beginner LevelSystem Design & Architecture

What is Vertical Scaling (Scale Up) vs Horizontal Scaling (Scale Out)?

Beginner LevelSystem Design & Architecture

How do Load Balancers distribute traffic (Round Robin, Least Connections, IP Hash)?