We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
6 system design questions lean on this idea. Each walks through the full answer.
System Design Masterclass · Caching Strategies
Free preview: the first 2 parts of this 10-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design courseread the rest of this lesson in
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design coursein Caching Strategies
This lesson is part of the full System Design Masterclass. Unlock it along with 769 other lessons for a one-time payment.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime Access18 Foundation lessons are free, no payment needed. Try them now
It is easy and good
“It is really nice and good Please join the course”
When one cache node is no longer enough, the keys are spread over several. The obvious way to decide which node holds which key is a remainder, and it fails for a specific reason.

A tenth of them should move, because the new node has to own a tenth of the key space. Modulo moved everything else as well, for no reason connected to what the cluster now looks like.
Every key that moves is a miss. A modulo cluster's hit rate goes to roughly zero at the moment a node is added and stays there until the whole working set has been refetched, which is why the ring exists.

Because a node owns an arc rather than a remainder, adding one only affects the keys inside the arc it takes, and every other key stays exactly where it was.

Virtual nodes took the key imbalance from 2.79 times to 1.05, and the request imbalance from 3.68 to 2.16 without converging.

Ten random points on a circle do not divide it evenly. Placing each node at many points averages the arcs out, and the imbalance falls towards one as the number of points grows.
A hundred to a few hundred virtual nodes per physical node is the usual setting and the measurement supports it. Below twenty the imbalance is large enough to matter, and above five hundred the return is small.