Raft: In Search of an Understandable Consensus Algorithm
For this recitation, you'll be
reading In Search of an
Understandable Consensus Algorithm. This paper describes Raft, an
algorithm for achieving distributed consensus. The paper contrasts
Raft to an algorithm called Paxos: you do not need to know
anything about Paxos to read this paper. Raft was designed to be more
understandable than Paxos.
Before reading the paper, check out two very
helpful websites, which have some useful visualizations:
With those visualizations in mind, read the paper. Skip sections
5.4.3 and 7.
- The first four sections give background and motivation for Raft.
Sections five and six are the primary technical sections.
- Fig. 2 is a good reference to come back to after you've
read the paper. Don't get stuck trying to memorize the entire table
before you move onto page 5 of the paper; skip it, come back to it
during your reading or at the end.
Here are some questions:
-
What are the roles that a node can have in Raft? What is the function of each role?
-
What is the log for?
-
How does a cluster of nodes elect a leader?
-
"Without a steady leader, Raft cannot make progress." Why not?
-
Why is it important that at most one candidate win an election (the Election Safety Problem)?
-
How does Raft handle follower failures?
-
How does Raft handle candidate failures?
-
How does Raft handle leader failures?
-
How does Raft handle network partitions?
-
At the top of 5.3, the paper says that leaders will retry AppendEntries RPCs indefinitely. Why don't they abort after a timeout?
The deadline of your answer is 23:59, 2020-11-16. Please write your answer into a text file or PDF and upload it to ftp://public.sjtu.edu.cn/upload/cse/reading2/[your-student-id].txt, like 518021910000.txt
- FTP username: esdeath
- FTP password: public