AlgoViz

Design a Content Delivery Network (CDN)

hard 45 min

Build the service that other websites use to answer their visitors from nearby.

Where it shows up

The same pattern appears across everyday software.

  • Pictures, styles and scripts

    Files with a version in the name are kept for a year, since a change gets a new name.

  • Video on demand

    Each film is many small files in several qualities. Popular ones stay at the edge, old ones at the shield.

  • Live sport

    Everyone wants the newest few seconds at the same moment. Joining equal requests is what keeps the origin alive.

  • Software updates

    Very large files with range requests, so that a broken download can continue.

  • API acceleration

    Answers that cannot be kept still gain from a nearby TLS handshake and a warm connection to the origin. Even one second of caching helps a public list.

  • Cloudflare's published purge work

    Its blog reports a median of under 150 ms for purges by tag, hostname and prefix in 2024. Our target is 5 seconds.