Raft: Leader Election and Log Replication · seed 1 · A4, ink-friendly. The answer key prints on its own page for grown-ups.

Raft elects, then replicates

Computing · Networks & Security · ages 22-23
Name ______________________   Date ____________
  1. When is a log entry committed?

    • When the leader thinks of it
    • When one follower glimpses it
    • Once a majority holds it
  2. What numbers Raft elections?

    • Terms
    • Lottery tickets
    • Port numbers
  3. In Raft each node votes at most once per term.

    Circle one:   True   False

  4. The leader fails after an entry reached three of five nodes. What happens to it?

    • It is lost with the leader
    • It returns to the client unsent
    • It survives on the new leader
  5. Two candidates campaign in term 5. Why does only one win?

    • The slower candidate always yields
    • Majorities overlap and the shared voter picks once
    • Terms forbid campaigning
  6. An entry sits only on the failed leader. What is its fate?

    • It may be gone, since no majority holds it
    • It always survives anyway
    • It automatically commits itself
  7. A cluster splits 2 and 2 during term 6 with no majority side winning. What holds?

    • Both sides elect rival leaders
    • No leader wins term 6 until the split heals
    • The smaller side takes over
  8. A rule lets stale nodes win elections. Which bad history follows?

    • A new leader missing committed entries
    • Nothing, staleness is harmless
    • Faster elections with no downside
LightMySky · lightmysky.comW1-mt_JdHtEJSPSP-s1

Answer key

For grown-ups. Fold this page away before handing over the rest.

Raft elects, then replicates W1-mt_JdHtEJSPSP-s1

  1. Once a majority holds it · Majority storage is the commitment threshold.
  2. Terms · Each election belongs to its term.
  3. True · Single voting is what bars two winners.
  4. It survives on the new leader · Three of five is a majority, so the entry is committed.
  5. Majorities overlap and the shared voter picks once · One shared voter cannot crown both.
  6. It may be gone, since no majority holds it · Without a majority it was never committed.
  7. No leader wins term 6 until the split heals · An even split elects nobody; leadership waits until the split heals.
  8. A new leader missing committed entries · The up-to-date rule exists exactly to block that loss.
Worksheet · LightMySky