Index

Raft 01: Leader Election

Who Holds the Pen
Who Holds the Pen · Open board

The System Design episode on who is allowed to write and what the picking cannot protect. This lesson builds the picking. Part of the Raft series, Build Your Own Raft.

Before you start. This series builds a small copy of Raft, the algorithm a group of machines uses to keep one shared list of commands. This first stage builds only the part that decides which machine is in charge. You need Build Your Own Raft for the map and for what the simulated world looks like (five nodes, a queue for a network, a clock that moves one tick at a time). The idea of one machine holding the pen comes from Who holds the pen (consensus & Raft).

Continue reading with a plan

The first three lessons of every track are free. This lesson is included with a plan, which unlocks every lesson, board, video, lab and paper for one price.

View plans →Already a member? Sign in

Lab

The room splits in two. Both halves think they are in charge. Who is allowed to write?

Stay on Whoever asks first, press Add next write to the end of the night, and watch The bill so far.

Open Who holds the pen →

Related paper

Review From Scratch →

Saved in this browser, and to your account when you sign in.