CDN Anycast Edge Lab (Interactive)
Route four world regions to Anycast PoPs, flip hit/miss, and stampede the origin with or without shielding. Trace BGP Anycast routing and cache lookups, compute hit versus miss TTFB per city, and watch origin-shield request collapsing crush thundering-herd load.
CDN Anycast & Origin Shield Lab
Route a user to the nearest PoP via BGP Anycast, then measure hit/miss TTFB and thundering-herd origin load.
Edge RTT 15ms · origin RTT 220ms
REQUEST TRACE
› Press “Fetch asset” to trace BGP Anycast routing + cache lookup.
Local TLS termination + NVMe read.
Trans-oceanic RTT × TCP slow start × repeated TLS from Sydney 🦘 to us-east-1.
Origin load during burst
Concurrent origin fetches0
Origin bandwidth0 Mbps
Zero origin load — 97%+ of traffic absorbed at the edge (Spotify/Cloudflare pattern).
How It Works Under the Hood
Physics makes origins far: a Sydney user downloading from us-east-1 pays ~220ms transpacific RTT plus TCP slow start and TLS negotiation before the first byte, turning a 5MB asset into a multi-second load. CDNs deploy hundreds of edge PoPs that all advertise one Anycast IP, so BGP automatically steers packets to the topologically nearest data center where TLS terminates locally and NVMe cache answers in under 10ms. On viral misses, request collapsing merges duplicate waits at each PoP into a single origin fetch, and an Origin Shield tier collapses across all PoPs, turning thousands of stampede requests into roughly one stream.
Core Architectural Principles
- Anycast: every PoP advertises the same IP; BGP shortest-AS-path routing picks the nearest one automatically.
- Cache HIT TTFB is edge RTT; a MISS adds shield plus origin roundtrips — and BGP failover beats GeoDNS TTLs.
- Request collapsing + Origin Shield merge concurrent duplicate misses into one origin fetch.
Explain Anycast mechanically — same IP advertised globally, routers pick the shortest path, withdrawal reroutes in milliseconds. Distinguish max-age from s-maxage, and when discussing flash crowds, name request collapsing and origin shielding as the thundering-herd antidote before touching the origin.
Edge caching absorbs 85-98% of traffic and cuts latency 40x, but global invalidation across hundreds of PoPs is slow, costly, and cache keys can go stale.