Course contentsShow
← System Design
Lesson 639 of 1,91917. Consensus AlgorithmsFree lesson

Consensus Cluster Sizing Tradeoffs

Why consensus clusters typically use 3, 5, or 7 nodes: balancing fault tolerance against write performance and complexity.

Consensus Cluster Sizing Tradeoffs

What you'll learn: Why consensus clusters almost always use 3, 5, or 7 nodes—not 2, 4, or 10—and how this balances fault tolerance with performance.

Why Odd Numbers?

Consensus algorithms like Raft and Paxos rely on majority quorums to make decisions. With an even number of nodes, you get no additional fault tolerance—a 4-node cluster can tolerate only 1 failure (just like 3 nodes), but requires 3 votes instead of 2, making writes slower.

The Magic Numbers

  • 3 nodes: Tolerates 1 failure. Common for low-latency requirements where a single datacenter failure is acceptable. Requires 2/3 majority.

  • 5 nodes: Tolerates 2 failures. The sweet spot for most production systems—good balance of durability and performance. Requires 3/5 majority.

  • 7 nodes: Tolerates 3 failures. Used when extreme availability is critical (multi-region deployments). Requires 4/7 majority.

The Tradeoffs

More nodes = Higher fault tolerance but also:

  • Slower writes: Every committed log entry must reach more machines
  • More network traffic: Leader sends AppendEntries to all followers
  • Higher operational complexity: More servers to monitor, upgrade, and debug
  • Diminishing returns: Going from 5 to 7 nodes adds significant cost for just one more failure

Think of it like a committee vote: a 3-person committee decides quickly but one absence breaks it; a 7-person committee survives three absences but takes longer to reach consensus and coordinate schedules.

Why Stop at 7?

Beyond 7 nodes, the performance cost rarely justifies the added resilience. Most systems achieve high availability through geographic distribution of 5 nodes rather than massive clusters.

Key Takeaway: Consensus clusters use small odd numbers (3, 5, or 7) because they maximize fault tolerance per node while minimizing write latency and operational overhead—even numbers waste capacity without improving resilience.