Distributed Systems - Quorum vs Raft vs 2PC

Quorum vs. Raft: The Hierarchy of Distributed Systems

In distributed systems, we often confuse "how we store data" with "how we govern it." To build reliable systems, we must distinguish between a mathematical property (Quorum), an orchestration protocol (Raft), and a logical contract (ACID).

1. The Functional Split

The primary difference lies in which "Plane" the logic occupies:

2. The "Fencing" Problem

These approaches differ most during a network failure:


3. The Hierarchy of Guarantees

We can visualize these concepts as a stack. Each layer solves a progressively harder problem:

LayerPrimary GuaranteeWhat it Solves
ACID (The Peak)CorrectnessLogical validity (e.g., bank transfers are safe and private).
Consensus (The Middle)OrderingAgreement on a single, linear sequence of events.
Quorum (The Base)DurabilitySurvival of data even if a minority of nodes fail.

4. Scaling: Partitioned Consensus

A single Raft group is a bottleneck. Modern systems like CockroachDB, TiDB, and Kafka scale by breaking data into shards, where each shard runs its own independent consensus.

5. Case Study: Kafka’s Hybrid Approach

Kafka (KRaft mode) uses a clever "Brain vs. Muscle" distinction:

  1. The Metadata Quorum (The Brain): A single Raft group for high-level cluster state.
  2. Data Partitions (The Muscle): A leaner protocol called ISR (In-Sync Replicas) for the messages. This keeps the data plane fast by avoiding the "chatter" of thousands of independent Raft heartbeats.

Summary Comparison

SystemControl Plane (The Brain)Data Plane (The Muscle)
CockroachDBMulti-Raft (Distributed)Multi-Raft (Distributed)
Kafka (KRaft)Raft QuorumISR Replication
AWS AuroraExternal Cluster ManagerStorage Quorum ($W + R > N$)

The Bottom Line: The Franchise Model

Think of a global business:

Quorum gives you durability, Consensus gives you ordering, and ACID gives you correctness.