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

Performance Characteristics of Consensus

Understanding write latency (multiple round trips), read optimization, and why consensus is not suitable for high-throughput writes.

Performance Characteristics of Consensus

You'll learn why consensus algorithms aren't speed demons and where they shine (hint: not high-throughput writes).

The Latency Cost of Agreement

Consensus protocols like Raft or Paxos require multiple round trips across the network before any write completes. A leader must send proposals to a majority of nodes, wait for acknowledgments, then confirm commitment. This typically means:

  • 2-3 network round trips minimum per write operation
  • Latency measured in milliseconds to tens of milliseconds (cross-datacenter scenarios push this higher)
  • The slowest responding node in your quorum determines your write speed

Think of it like passing a law: you can't just decide alone—you must propose it, collect votes from a majority, then officially enact it. This democratic process is safe but inherently slower than a dictator making instant decisions.

Read Optimization Paths

Reads can be faster than writes if you're willing to trade guarantees:

  • Stale reads from any follower: instant, but might be outdated
  • Linearizable reads from the leader: requires a heartbeat round trip to confirm leadership
  • The leader itself already knows the committed state, so local reads are temptier (but dangerous without verification)

Why Consensus Isn't for High-Throughput Writes

Consensus algorithms excel at correctness over speed. They're perfect for:

  • Leader election (happens rarely)
  • Configuration updates (infrequent)
  • Distributed locks (low volume)

They struggle with:

  • High write throughput workloads (every write is a coordination ceremony)
  • Latency-sensitive applications expecting sub-millisecond responses
  • Write-heavy databases needing thousands of operations per second per node

Key Takeaway: Consensus trades write performance for strong safety guarantees—use it for coordination tasks and critical metadata, not high-volume transactional workloads.