E-Learning Platform
0 of 139 builtAlways freeSign in
← Network Foundations I
3.05

Copies Near You

On this stop
  • CDNs
  • Caching

A new episode of a global show drops at midnight, and within the hour tens of millions of people press play — in Nairobi, in Oslo, in Osaka — and for all of them it starts instantly. Check that against what you know. Latency is the length of the road; oceans are long. If every viewer's parcels trekked to one distant data center, physics alone would make "instant" impossible, and the poor building would face the whole planet's midnight at once. So that's not what happens. What happens is a trick you already use in your kitchen.

Caching: keep a copy you'll need again

You don't fetch salt from the shop each time you cook. You fetched it once; a copy lives within arm's reach. That's caching: keeping a copy of something close, because you'll probably want it again, so the next want is served in seconds instead of a trip.

Your browser has been doing this under you all along. Revisit a site and it feels snappier — the logo, the styles, the fonts came from copies kept on your own device from last time, dozens of lesson-2 asks that never left the building. DNS answers, remember, get cached too. First visits pay full price; returns ride the pantry.

Every cache lives with one eternal dilemma: is my copy still fresh? Salt keeps; news doesn't. So cached copies carry best-before rules ("reuse this for an hour"), and the occasionally maddening advice "try a hard refresh" is nothing more than telling your browser: skip the pantry, fetch everything from the shop again.

The CDN: branch libraries for the planet

Now scale the pantry to civilization. A CDN — content delivery network — is a company operating thousands of caching servers planted everywhere: in cities on every continent, often inside local internet providers' own buildings. Sites that serve the world park copies of their heavy, popular content — video, images, entire pages — on all of them.

The mapped picture: one great library with branch libraries in every neighborhood. The rare original lives at headquarters; the branches stock copies of everything the neighborhood keeps asking for. When you press play at midnight, a small act of misdirection happens: the name lookup (DNS, earning its keep again) answers with the address of the branch nearest you, not headquarters. Your parcels travel kilometers, not continents.

Both of Unit 1's numbers collapse at once: latency, because the road shrank from an ocean to a neighborhood; and the load on headquarters, because ten million viewers become ten million branch visits — the origin served each branch one copy, once. This is also unsung resilience: on the internet's worst days, a famous site's front page often stays up for most of the world because the branches keep serving copies while headquarters wobbles.

So the full picture of "the internet feels fast" is layered pantries: your browser's cache, your neighborhood's CDN branch, the origin behind them — each layer catching what the one before it missed, and the longest road walked as rarely as possible.

The city is nearly toured: roads, rules, seals, buildings, branches. What's left is its security detail — the guard at your door who's been silently working this entire course — and then the finale: what to do when, despite all of it, the internet breaks.