Imagine five servers that need to agree on every operation — every database write, every configuration change — even though any server can crash at any moment, and messages between them can be delayed or lost. This is the consensus problem, and it is one of the most fundamental challenges in distributed systems.
For years, Paxos was the standard answer. It works, and it is provably correct — but it is notoriously hard to understand, and harder still to implement correctly. Real-world systems built on Paxos often required the designers to invent their own extensions just to fill in the gaps the original paper left open.
In 2014, Diego Ongaro and John Ousterhout published Raft — an algorithm designed from the ground up with one explicit goal: understandability. They decomposed the consensus problem into three nearly independent sub-problems: leader election, log replication, and safety. The result is an algorithm that engineers can actually hold in their heads and implement correctly.
Raft is now the consensus engine behind etcd (which powers Kubernetes), CockroachDB, TiKV, and dozens of other production systems. It is the algorithm you reach for when you need distributed agreement and you want to be able to reason about what your code is actually doing.
Comments
Loading comments...