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.

Here are some questions:

  1. What are the roles that a node can have in Raft? What is the function of each role?
  2. What is the log for?
  3. How does a cluster of nodes elect a leader?
  4. "Without a steady leader, Raft cannot make progress." Why not?
  5. Why is it important that at most one candidate win an election (the Election Safety Problem)?
  6. How does Raft handle follower failures?
  7. How does Raft handle candidate failures?
  8. How does Raft handle leader failures?
  9. How does Raft handle network partitions?
  10. 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