The Raft Consensus Algorithm

Diego Ongaro and John Ousterhout

Stanford University

May 2015

raftconsensus.github.io

Paxos Protocol

  • Leslie Lamport, 1989
  • Nearly synonymous with consensus
“The dirty little secret of the NSDI community is that at most five people really, truly understand every part of Paxos ;-).”
—NSDI reviewer
There are significant gaps between the description of the Paxos algorithm and the needs of a real-world system...the final system will be based on an unproven protocol.
—Chubby authors

Raft's Design for Understandability

We wanted an algorithm optimized for building real systems

  • Must be correct, complete, and perform well
  • Must also be understandable

“What would be easier to understand or explain?”

  • Fundamentally different decomposition than Paxos
  • Less complexity in state space
  • Less mechanism

How Is Consensus Used?

Top-level system configuration

Replicate entire database state

Raft User Study

Raft Implementations

Name Primary Authors Language License
etcd/raft Blake Mizerany, Xiang Li and Yicheng Qin (CoreOS) Go Apache 2.0
go-raft Ben Johnson (Sky) and Xiang Li (CMU, CoreOS) Go MIT
hashicorp/raft Armon Dadgar (hashicorp) Go MPL-2.0
copycat Jordan Halterman Java Apache2
LogCabin Diego Ongaro (Stanford, Scale Computing) C++ ISC
akka-raft Konrad Malawski Scala Apache2
kanaka/raft.js Joel Martin Javascript MPL-2.0
rafter Andrew Stone (Basho) Erlang Apache2
OpenDaylight Moiz Raja, Kamal Rameshan, Robert Varga (Cisco), Tom Pantelis (Brocade) Java Eclipse
liferaft Arnout Kazemier Javascript MIT
skiff Pedro Teixeira Javascript ISC
ckite Pablo Medina Scala Apache2
willemt/raft Willem-Hendrik Thiart C BSD

Copied from Raft website, probably stale.

LogCabin

  • C++, permissive license
  • Started as research platform for Raft at Stanford
  • Working with Scale Computing to make production-ready
  • 1.0 released last week
    • Rolling upgrades
  • Looking for more users!