May we use cookies so Meta, Google, LinkedIn and ChatGPT see your visit and we learn which ads work? PrivacyMay we use cookies to see which pages help, and let Meta, Google, LinkedIn and ChatGPT see your visit, so we know which of our ads work? That way we spend less on ads that do not work. We do not sell your data, and the site works the same if you decline. You can change your answer at any time under Cookie settings at the foot of the page. Privacy policy
Loading...
6 system design questions lean on this idea. Each walks through the full answer.
System Design Masterclass · Load Balancing Proxies
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
$35 once, by card or PayPal
See the System Design courseread the rest of this lesson in
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$35 once, by card or PayPal
See the System Design coursein Load Balancing Proxies
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”
The previous lesson ended with a mechanism whose behaviour was decided by resolvers nobody in your company controls. This one is the same shape again, with the stakes moved from routing to content.

A is a cache in front of your origin, run by somebody else, in thousands of places at once. Both halves of that sentence matter. The first half is why people buy one. The second half is where all the difficulty comes from.

A miss adds a hop, so the first user waits for both legs of the journey. The economics only work because misses are rare, and misses are only rare if the cache key is right.
That last sentence is the whole lesson.

Two requests with the same key share one stored copy. Two requests with different keys are two separate objects, even when the bytes are byte for byte identical. Nothing here is about your content, and everything is about what the edge decides it may reuse.
A cache key that is too broad serves the wrong content to somebody. A cache key that is too narrow serves the right content and stores a separate copy for every visitor, which is a cache that never hits. The second failure is far more common and much harder to notice, because nothing breaks.
Every write-up of this subject states the same rule: the query string is part of the cache key, so appending a tracking parameter fragments your cache. It is a good story with a clear villain. It was also worth checking.