Preparing your design workspace

Loading the problem and your latest saved attempt…

Design a Content Delivery Network

Design global delivery of versioned static objects through edge caches with bounded invalidation and resilient origin protection.

Problem statement

For this exercise, assume publishers upload immutable, versioned static objects and publish a logical asset key that points to one version. Users fetch the published object through a nearby healthy edge location. An edge miss retrieves the immutable version from a replicated origin and may cache it.

An authorized publisher can invalidate a version; healthy edge regions must stop serving it within one minute, while bounded staleness is acceptable before that deadline. Serve one million peak requests per second globally, support objects up to 100 MB, and return the first byte of a cached hit within 100 ms at p95.

Object delivery must remain available through the loss of one origin region or one edge region. Dynamic computation, video transcoding, personalized authorization, billing, and publisher content creation are outside scope.

What to build

  1. An authorized publisher can durably upload an immutable object version and atomically publish a logical asset key to that version.
  2. A user can fetch the published bytes through a nearby healthy edge, including a cache miss that fills from the replicated origin.
  3. An authorized publisher can idempotently invalidate one version and inspect whether healthy edge regions have applied the invalidation.
  4. The service continues delivering valid published objects when one edge region or one origin region is unavailable without overwhelming the remaining origin path.

At scale

  • Serve one million peak object requests per second globally, with traffic and object popularity allowed to be highly skewed.
  • Support immutable objects up to 100 MB and return the first byte of a cached hit within 100 ms at p95; full transfer time depends on object size and client bandwidth.
  • Propagate each invalidation to every healthy edge region within one minute and never serve the invalidated version from an edge after that edge has applied the invalidation.
  • Remain available through the loss of one origin region or one edge region, and bound miss amplification during recovery.