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 02 · Data Systems · Data on many machines · about 21 min to read

Play it as a journeyTutor comes with a plan

Consistency and Consensus

Consistency and Consensus
Consistency and Consensus · Open board

A precise map of what a group of machines can still promise each other once the network, the clocks, and time itself can’t be trusted: one strong guarantee, and the vote underneath it. The cut phone line (CAP, done properly) and Who holds the pen (consensus & Raft) drew the same two ideas on the System Design boards first. This lesson gives them their formal names.

Before you start. The previous lesson, When Machines Fail, showed why no machine in a group can fully trust the network: a message can be late, lost, or arrive after the machine that sent it has already been declared dead. This lesson asks what a group of such machines can still promise each other, and the answer needs only one more idea: a vote. If a network split forcing a choice between staying current and staying up is new, The cut phone line (CAP, done properly) in System Design shows it in one read.

Lesson 16 of 24 in Data Systems

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

  • The one thing a machine can’t decide by itself
  • 1989: a parliament, and a majority that can’t be undone
  • 2014: Raft, and the machine allowed to hold the pen
  • Five legislators, cut in two
  • The promise a majority finally buys you
  • Where you will meet this

Terms it explains: consensus, leader, term, linearizability, vector clock, quorum, two-phase commit, etcd, Raft, 2PC, causal consistency, coordination service, coordinator/participant, FLP, Lamport timestamp, partial vs total order, Paxos/Raft/Zab, strict serializability, total order broadcast.

Related papers

Review Data Systems