freecoding.school100% FREE · NO SIGNUP
Gateway RidgeISSUE #7 of 35

cdn caching · edge caches

Gateway GusVSTimeout Titan
Gateway Gus saysCDNs cache responses at edge locations near users — fast delivery and origin offload.

A Content Delivery Network caches your responses on servers worldwide, so a user in Tokyo hits a nearby edge instead of your origin in Virginia. It slashes latency and shields the origin from traffic spikes. CDNs honor your cache headers; you control freshness with Cache-Control and purge/invalidate when content changes. Great for static assets and cacheable GET APIs.

Power-ups you unlock

Timeout Titan attacks — common mistakes

Boss battleExplain how a CDN helps both latency and origin load.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>user(Tokyo) → edge(Tokyo) cache hit  ← fast
miss → edge fetches origin once, caches, serves many</pre></body></html>
▶ Open the interactive comic issue
‹ Caching · Vary · Cache-Control · ExpiresError Responses · Problem+Json · Message + Code ›