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.
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 contentsThis 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