Design a Custom Content Delivery Network (CDN)
Build a global edge cache: BGP Anycast routing, Edge Points of Presence (PoPs), Consistent Hashing cache proxy clusters, Origin Shield tiering, and cache purge propagation.
01.1. Functional & Non-Functional Requirements
A Content Delivery Network (CDN) is a geographically distributed network of proxy servers and datacenters (Points of Presence - PoPs) that caches static and dynamic web content (images, JavaScript, CSS, video segments, API responses) close to end users.
Functional Requirements
- Static & Dynamic Asset Caching: Cache HTTP resources adhering to
Cache-Control,ETag, andSurrogate-Controlheaders. - Instant Cache Invalidation (Purging): Support URL purges, wildcard purges (
/images/*), and tag-based purges (Surrogate-Key: product_9918) across all global edge nodes in< 150 ms. - Origin Shield Tiering: Protect customer origin servers from being overwhelmed by simultaneous cache misses from hundreds of global PoPs.
- Edge Programmability: Execute lightweight code (WebAssembly / V8 isolates) at the edge for header transformations, bot mitigation, and geo-routing.
Non-Functional Requirements
- Ultra-Low Latency: Serve cached assets with time-to-first-byte (TTFB)
< 10 ms(p99) globally. - Massive DDoS Absorption: Absorb multi-terabit volumetric DDoS attacks at the perimeter without passing load to customer origins.
- High Cache Hit Ratio: Achieve
> 95\%cache hit ratio for static media.
Global CDN Edge PoP & Origin Shield Architecture ๐
Global CDN Edge PoP & Origin Shield Architecture ๐
BGP Anycast routing clients to the nearest physical Edge PoP, tiered Origin Shield protecting origin servers from thundering herd misses, and sub-second pub/sub cache purge broadcasting.
Unlock Topic #253: Design a Custom Content Delivery Network (CDN)
You are viewing a preview. The full in-depth engineering deep dive, interactive simulators, architecture flowcharts, and self-assessment quizzes for this topic are available with Pro or Lifetime Access.
Failure modes, high-throughput bottlenecks, and real FAANG implementation decisions.
Interactive system topology diagrams, live parameter simulators, and downloadable SVG charts.
Staff-level multiple-choice quiz questions with instant feedback and answer explanations.
Firebase Google authentication automatically syncs your completed topics and quiz scores.
How clear and staff-actionable was this system breakdown?