Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 11 · From Scratch · Raft · with code: Go · about 13 min to read

Play it as a journeyTutor comes with a plan

Raft 02: Log Replication

Consistency and Consensus
Consistency and Consensus · Open board

The Data Systems map of what a group can still promise. This stage builds the promise that a command, once acknowledged, stays acknowledged. 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. Raft 01: Leader Election built the first job, picking a single leader and replacing it when it goes quiet. This stage builds the second job: the leader copies its list of commands to the others, and the group decides when a command is safe. You need the terms and votes from that lesson.

Lesson 79 of 117 in From Scratch

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • 23 June 2020: nodes that could delete operations
  • A log, an index, and who may overwrite whom
  • What changed from stage 01
  • The follower: extend what matches, cut what conflicts
  • The leader: count, but only your own term
  • Run it
  • The tests
  • Break it, four ways

Terms it explains: index, log, committed, its own term, 2PC, causal consistency, consensus, coordination service, coordinator/participant, FLP, Lamport timestamp, linearizability, partial vs total order, Paxos/Raft/Zab, strict serializability, total order broadcast.

Related papers

Review From Scratch