Paxos was the accepted consensus algorithm, but it was hard to understand and hard to implement, so production systems built on it were prone to subtle bugs that only surfaced under leader failure.

Raft was written with a different priority: it is equivalent to Paxos in fault-tolerance and performance, and the difference is that it is designed to be easy to understand. Its authors broke consensus into a leader election, a log replicated in order, and a safety rule.

That separation is what let a wider audience implement it correctly. Understandability was treated as a first-class requirement, and the result was a consensus algorithm teams could actually reason about and ship.

Design the algorithm for the human who has to verify it

Understandable phases map to what a programmer can verify.

Cleverness in consensus tends to breed implementation bugs.

Wider correct adoption beats a marginal performance edge.

When correctness depends on many others getting it right, make the hard thing easy to verify; a design that is merely clever costs more through bugs than it gains in elegance.

Raft was adopted by etcd, Consul, CockroachDB and many other distributed systems, and became the default way engineers learn and build consensus.

FOLLOW THE EVIDENCE

The sources

  1. In Search of an Understandable Consensus Algorithm (Raft) Stanford University · raft.github.io
  2. etcd documentation etcd · etcd.io