Skip to content
Ameen Abozaid
Planned lessonSRB-003-L02

Consensus and Raft

  • Lesson 2 of 7
  • Senior B
On This Lesson 4 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

explain Raft well enough to judge systems that rely on it.

Planned topics

  • Consensus makes a group agree on one ordered log despite failures.
  • Raft: leader election by term, log replication, commit when a majority has the entry.
  • A majority (quorum) is needed, so 3 nodes tolerate 1 failure, 5 tolerate 2.
  • Without a majority the system stops accepting writes rather than diverge; that is a choice for consistency.
Draft outline details

Demonstration

a timeline of a 3-node cluster: leader N1 fails, N2 times out, requests votes in term 2, wins with N3, continues the log; a diagram of an entry committed once on 2 of 3 nodes.

Check your understanding

How many failures does a 5-node Raft group tolerate?

Show answer

Two, since a majority of three must remain.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.