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 17 min to read

Play it as a journeyTutor comes with a plan

When Machines Fail

When Machines Fail
When Machines Fail · Open board

The moment your program runs on more than one machine, three things you took for granted about a single computer stop being true. This lesson shows each one breaking.

Before you start. The previous lesson, Partitioning, cut one dataset into pieces and gave each machine only its piece. Earlier, Transactions gave you one machine’s promise: a transaction finishes whole or leaves no trace, because the one machine running it is always there to keep it. This lesson asks what happens to that promise once the one machine becomes two, like the leader and follower from Replication, talking over a wire that can be cut, delayed, or go quiet.

Lesson 15 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

  • One machine can only be all the way up or all the way down
  • 1975: two copies of a database that couldn’t agree which write came first
  • 1978: stop asking the clock, count what happened before what
  • A cable cut, and a leader that took a minute to notice
  • 40 milliseconds, and the write that lost to an older one
  • A frozen program wakes up still believing it’s in charge
  • 2006: Google hands out a number a stale lease can’t fake

Terms it explains: partial failure, logical clock, timeout, lease, fencing token, Safety, liveness, BFT, Byzantine fault, clock skew/drift, process pause, quorum, safety vs liveness, shared-nothing, system model, time-of-day vs monotonic clock, TrueTime, unbounded delay.

Lab

A follower sends a heartbeat every second and the leader gives up after some silence. How much silence is enough?

Drag How much silence before giving up and watch Live followers called dead fall while Seconds to notice the crash climbs.

Open The heartbeat timeout

Related papers

Review Data Systems