raftalghorithm

Raft - In Search of an Understandable Consensus Algorithm

Raft

Raft is a consensus algorithm designed to implement state machine replication.

Key features of Raft:

  • Problem decomposition
    • Leader Election
    • Log replication
    • Safety
  • Simplicity
    • Only 2 RPC methods (RequestVote and AppendEntries).
    • Only 3 Node state: Leader, Candidate, Follower

The interesting aspect of Raft is that its primary design goal is understandability. In the paper, the authors repeatedly says that another consensus algorithm, Paxos, is too difficult to understand. lol

I haven't studied Paxos yet, but one of my colleagues says it is exteremely difficult to grasp.

In general, algorithms design tends to prioritize efficiency and lower computational complexity(in term of time and space). In contrast, Raft treats understandability as a high priority designing goal.

References

  • article: https://raft.github.io/raft.pdf

  • formal verification implemented with TLA+: https://github.com/ongardie/raft.tla/blob/master/raft.tla

  • Qiita(分散合意アルゴリズム Raft を理解する): https://qiita.com/torao@github/items/5e2c0b7b0ea59b475cce