deep dive 1 A million viewers at once, and the bytes cannot leave one box
The origin works until an audience shows up. A popular video is being watched by a huge audience at once, spread across cities and countries. Every viewer is pulling a steady multi-megabit stream, continuously. Together they demand terabits per second of outbound bytes. One origin's link to the internet is orders of magnitude too small to push that. It does not slow down gracefully; past the first few thousand viewers, it simply cannot move the bytes. Where do the bytes come from?
Follow the obvious answer first, because it is what most people reach for: give the origin a bigger pipe. Put it on a fatter uplink, or add a few more origin servers behind a load balancer. It is the design you already have, scaled up, and the attraction is real. But the arithmetic kills it. ~500k people watching at once, each pulling ~3 Mbps, is ~1.5 Tbps from one region. A single high-end serving box tops out around ~100 Gbps. That regional demand is well over ~16 times what one box can push, on one mid-size region, on one popular title. A bigger pipe is not that much bigger. It is an order of magnitude short, and the gap widens with the audience. It also does nothing about distance: those viewers are spread across a continent, and serving them from one central location means every byte crosses the whole way, slow to start and expensive to carry.
A second instinct sounds sophisticated: put a cache in front of the origin. But a plain key-value cache is built to answer lookups faster. It remembers an answer so you do not recompute it. The origin's problem is not slow lookups. It is that bytes cannot leave the building fast enough, and a cache next to the origin still pushes every one of those bytes out the same regional uplink. It caches the wrong thing. The ceiling here is bandwidth, not lookup speed, and no amount of remembering answers moves more bytes through a fixed pipe. Neither a bigger pipe nor a cache in one place works. The fix is to spread serving across many appliances, each close to its viewers, so the aggregate rate is carried by the whole fleet and no single uplink is the ceiling.
A tier of caches close to the viewer — the CDN edge tier — with the origin serving only fills and misses. Stop serving the bytes from one place. Put the video on a tier of caches spread across the world, each one sitting close to where viewers actually are. A network of caches placed near viewers like this is called a content delivery network, or CDN, and this one is the CDN edge tier — edge because it sits at the outer edge of the network, nearest the people. Each location in it is called a PoP, short for point of presence, which is just a rack of cache machines parked somewhere close to viewers, very often inside the viewer's own internet provider. Those machines are called appliances: ordinary servers built to do one job, hold video and push it out fast. A viewer's player does not fetch segments from a distant origin. It fetches them from the nearest PoP, a short hop away. Here is the move that beats the arithmetic. The terabits of demand are no longer one number against one box. They are spread across hundreds of PoPs, each serving the viewers near it. That ~1.5 Tbps for one region becomes ~16 appliances working in parallel, each pushing its own ~100 Gbps to the viewers on its doorstep. Not one impossible origin pipe. Many small ones, each close to home.
The origin does not disappear, but its job changes completely. It stops sitting in the viewer's path. Instead it fills the edge, pushing copies of the videos out to the PoPs ahead of time during off-peak hours, and it answers the rare miss: fetching a missing segment once, serving it, and keeping a copy for next time. A PoP does not need the whole library, just the popular slice its region actually watches, a few hundred terabytes, with the most-watched tenth to fifth of that held in memory and served straight from RAM. The rarely-watched rest is not kept there at all, and a request for one of those falls through to the origin as a miss. This fleet is real: Netflix alone runs more than 8k of these appliances, part of why Netflix and YouTube together already account for roughly 28% of all the traffic flowing down to homes worldwide. The failure story is gentle too. If an appliance dies, its viewers are sent to a nearby PoP instead, and a miss just costs one fetch; the edge only ever holds copies of bytes the origin still has, so losing an appliance costs a warm cache, never a video. Outbound bandwidth does not scale up. It scales out, across many appliances, and outward, toward the viewer, until the bytes are served from inside the viewer's own network.