ContentsThe library

When One Machine Is Not Enough

Cutting the Data Into Pieces

Last timePutting Events In Order Without a Clock

When the data no longer fits on one machine it has to be cut up, and almost every difficulty that follows comes from the choice of where to cut.

A dataset grows past the largest disk you can buy, or a write rate grows past

what one machine can accept. Copies do not help with either, because every copy

holds everything. The data has to be cut up.

What splitting is for

It is worth separating the two arrangements clearly, because they are often

discussed together and they solve unrelated problems.

FIG 1Copies and pieces solve different problems
survives losing a machinserves more readsholds more dataaccepts more writes
copies only0.950.900.200.25
pieces only0.250.300.950.90
both together0.900.850.900.85
The marked row is what production systems actually run. Each piece is itself copied a few times, so the arrangement is a grid rather than a line, and losing one machine costs part of several pieces rather than all of one.

The key decides everything

Every record is assigned to a piece by its key. That single choice sets how

evenly the load spreads, which records end up near each other, and which queries

stay cheap.

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 Beopening only
  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 Piecesyou are here
  8. 08Designing for the Failure You Will Actually Getopening only

Read alongside