AlgoViz

CDN architecture and design

medium 32 min

How a CDN is built: edge locations, a shield in front of the origin, routing that finds a good edge, cache keys, and the choice between pulling content on demand and pushing it in advance.

Where it shows up

The same pattern appears across everyday software.

  • Netflix

    Open Connect appliances are filled before people watch and are chosen by a steering service.

  • Amazon CloudFront

    PoPs, regional edge caches and an optional Origin Shield form three layers in front of an origin.

  • Cloudflare Tiered Cache

    Lower-tier data centers ask an upper tier, and only the upper tier may ask the origin.

  • Fastly shielding

    One chosen PoP becomes the single way to the origin for all other PoPs.

  • Game patches

    A release of many gigabytes is placed at the edges before the hour it opens.

  • Online shops

    Pictures and scripts are pulled on demand, the home page is warmed, the cart bypasses the cache.