MentorNode
Start free
Caching & Content DeliveryHarddesign-cdn

Design a Content Delivery Network

Design a global edge network that serves static and cacheable dynamic content from a PoP near the user, while keeping the origin from ever seeing the traffic.

Edge CachingAnycast RoutingOrigin ShieldCache Invalidation
Traffic & Capacity Estimates:

300 PoPs · 100 Tbps peak egress · 95% edge cache hit ratio · <30ms TTFB

Functional Requirements

  • •Route each client to a nearby healthy PoP and serve cached objects directly from it.
  • •Fetch and cache on miss, honouring Cache-Control, ETag, and conditional revalidation.
  • •Support global purge of a URL or cache tag within seconds of a publisher request.
  • •Serve range requests and large media efficiently without buffering whole objects.

Non-Functional Requirements

  • •Time to first byte under 30ms for cache hits worldwide.
  • •A PoP failure must drain to neighbouring PoPs without client-visible errors.
  • •Origin must be protected from a simultaneous miss stampede across hundreds of PoPs.

Back-of-the-Envelope Math

  • 100 Tbps peak across 300 PoPs = ~330 Gbps per PoP.
  • At 95% hit ratio the origin sees 5 Tbps — an origin shield tier collapses that to well under 500 Gbps.

Key Architectural Trade-offs

  • Anycast BGP routing (self-healing, no DNS TTL delay) vs GeoDNS (precise steering, hostage to resolver caching).
  • Push-based pre-warming for predictable launches vs pull-through caching for the long tail.
  • Short TTLs with revalidation (fresh, more origin traffic) vs long TTLs with explicit purge (cheap, and now you own an invalidation system).

Click or drag a component onto the canvas, then connect the handles to draw the data flow.

3 nodes · 2 edges

Components · 35

Client & Edge4
Compute & Gateway7
Storage & Caching11
Messaging & Streaming6
Coordination & Ops5
Intelligence2
Canvas overview