FreeConceptCDN
What a CDN actually does
In one sentence: A CDN keeps copies of your files close to your users, so most requests never travel all the way to your server.
Animated diagrams are not available for printing. Get StackKinetic Pro to download this explainer.
Inspect:
Read this explainer as text
First visit (miss)
Beginner
- You ask for a page. The request goes to the closest CDN server, not the website’s own server.
- The nearby server doesn’t have a copy yet, so it asks a bigger cache further away.
- The bigger cache doesn’t have it either, so it asks the website’s own server.
- The website’s server sends back the file, with a note saying how long it may be kept.
- The bigger cache keeps a copy and passes the file on.
- The nearby server keeps a copy too, then hands you the page. Next time it will be much faster.
Practitioner
- DNS points the browser at the nearest edge location, which receives the HTTPS request.
- Cache miss at the edge. It forwards the request to its regional cache.
- Regional miss too, so the request goes to the origin.
- The origin returns the file with Cache-Control headers.
- The regional cache stores a copy and forwards it to the edge.
- The edge caches it and responds. The next request near you is a cache hit.
Architect
- Latency-based DNS or anycast lands the request on the nearest PoP, where TLS terminates.
- Edge miss; the cache key (path plus selected headers) is looked up in the regional tier.
- Origin fetch over a pooled, long-lived connection. Request collapsing merges duplicate misses.
- Response carries Cache-Control/ETag; max-age and s-maxage decide each tier’s TTL.
- Regional tier caches the object, so future misses from other PoPs stop here.
- Edge stores and serves the object; subsequent requests are served locally until the TTL expires.
Cache hit
Beginner
- You ask for the same page someone near you already loaded.
- The nearby server already has a copy, so you get it almost instantly. Your website’s server never hears about it.
Practitioner
- The request arrives at the nearest edge location.
- Cache hit: the edge answers directly. The origin isn’t contacted.
Architect
- Request lands on the PoP; the cache key matches a fresh object.
- Served from edge memory or disk in milliseconds; origin load and egress cost are zero for this request.
Regional hit
Beginner
- You ask for a page that’s popular in your region but new at your nearest server.
- The nearby server checks with the bigger cache.
- The bigger cache has it, so there’s no need to bother the website’s server.
- You get the page, and the nearby server keeps a copy for next time.
Practitioner
- The request reaches the nearest edge location.
- Edge miss; it asks the regional cache.
- Regional hit. The origin is skipped.
- The edge caches it and responds.
Architect
- Request lands on a PoP that hasn’t served this object yet.
- Edge miss forwarded to the regional tier.
- Regional hit: the shield absorbs the miss and the origin sees nothing.
- Edge fills from the regional tier and serves; one origin fetch can feed every PoP in the region.
Now add…
Take it with you
Pro adds video downloads, with embeds and editable source coming soon. Core explainers are always free to watch.