ContentsThe library

When One Machine Is Not Enough

How Far Behind a Copy Is Allowed to Be

Last timeWhy There Is Ever More Than One

Every copy of the data is behind the others by some amount, and the only real decisions are how far behind is acceptable and who is made to wait while it catches up.

Copies exist so that losing a machine does not lose the data. The moment there

are two of them, a new question appears that had no meaning before: when a write

arrives, which copies have it, and what are the others allowed to say in the

meantime?

Writes go to one place

The first decision is which copies may accept a write. The tempting answer is all

of them, and it causes a problem with no clean solution. Two copies accepting

writes to the same record will eventually receive conflicting ones, and when they

exchange notes afterwards, nothing in the system can say which was correct. They

happened at roughly the same moment on different machines, and as the next lesson

shows, there is no shared clock that could order them.

FIG 1One copy accepts writes, the others follow
The arrangement buys read capacity cheaply and write capacity not at all, since every write still goes through one machine. It also makes that machine the thing whose failure has to be handled carefully.

That one copy, usually called the leader, is now a single point of failure for

writing. Losing it does not lose the data, because the followers have it, but it

does stop writes until one of them is promoted. Arranging that promotion safely

is the subject of lesson five, and it is harder than it sounds.

The lesson stops here

6 more paragraphs to go

You have read the opening. The rest of the argument, the problems that check whether it landed, and the lines worth keeping at the end all come with a plan.

The first lesson of every course in the library reads the whole way through, free, so you can see exactly what the rest of them are.

See the planThe contents

This is the reading half

Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.

The contents

The rest of this course

  1. 01The Three Reasons, and What Each One Costs
  2. 02How Far Behind a Copy Is Allowed to Beyou are here
  3. 03Silence Means Nothing In Particularopening only
  4. 04What You Give Up When the Network Splitsopening only
  5. 05How a Group Decides Without a Bossopening only
  6. 06Which Thing Happened Firstopening only
  7. 07Cutting the Data Into Piecesopening only
  8. 08Designing for the Failure You Will Actually Getopening only

Read alongside