[video] https://www.youtube.com/watch?v=6Kwx8zfGW0Y
In this talk, we will discuss Raft and its TLA+ spec. Raft is a consensus algorithm for managing a replicated log. It produces a result equivalent to (multi-)Paxos. The design of Raft separates key elements of consensus algorithm, such as leader election, log replication, etc.., which results in the Raft more understandable and implementable. Raft has been widely taught and implemented, with a partial list of implementation available at https://raft.github.io/.
Paper and Spec (not required, but helpful to take a look before the lecture)
- In Search of an Understandable Consensus Algorithm (https://raft.github.io/raft.pdf)
- TLA+ specification for the Raft consensus algorithm (https://github.com/ongardie/raft.tla)
4. RAFT Paxos
Concept
Replicated Log for
Replicated State Machine
Consensus Algorithm
Leader Election
Key (First elected leader,
then normal operation)
Optional (A form of
operation)
Log maintenance
Leader’s Log is replicated to
all Followers
Node may log
consensus operation,
but it may have holes
TLA+ Spec
Close to developer’s
implementation & usage
More abstract
State Space Large Small