Advanced Distributed Systems #Raft #Paxos #quorum #leader-election

Consensus Algorithms

5 exercises — master consensus algorithm vocabulary: Raft vs Paxos, leader election, log replication, quorum calculation, log compaction via snapshots, and the pre-vote extension.

0 / 5 completed
Consensus algorithm quick reference
  • Raft — consensus via leader election + log replication + safety. Designed for understandability.
  • Multi-Paxos — equivalent guarantees, but less prescriptive implementation. Harder to implement correctly.
  • Term — Raft's monotonic epoch; a new term begins with each election attempt.
  • Quorum = ⌊n/2⌋ + 1. For 5 nodes: quorum = 3, fault tolerance = 2.
  • Commit — a log entry is committed when replicated to a quorum of nodes.
  • Log compaction — snapshotting state machine; discards already-applied log entries.
  • Pre-vote — partitioned nodes check election viability before incrementing the term (prevents term inflation).
1 / 5

A senior engineer says: "We're using Raft for leader election and log replication in our key-value store. Why Raft specifically, not Paxos?"

What's the key difference?