Many Boxes Pretending to Be One
Last timeWhen the Cache Makes Things Worse
One machine is never enough, so the keys get spread across many. Then the interesting questions are which box holds what, what happens when a box leaves, and what to do about one key everybody wants.
Everything so far has treated the cache as one thing. It is not. The amount you
want to hold exceeds what one machine can hold, and the traffic exceeds what one
machine can serve, so there are many of them pretending to be one.
Which box holds what
The first problem is agreement. If two readers disagree about where a key lives,
each will miss on entries the other is holding, and the hit rate collapses for
reasons nobody can see. So the location is not recorded anywhere. It is computed
from the key, by every reader, with the same rule.
When a machine joins or leaves
The obvious rule is to take the remainder of the key's number divided by the
number of machines. It is correct, cheap, and catastrophic, because changing the
machine count changes the answer for nearly every key at once. Add a tenth
machine to nine and you have not added a tenth of the capacity, you have emptied
the tier.
The lesson stops here
5 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