1. CDN purpose
A CDN caches content at points of presence close to users, cutting latency and offloading the origin server.
purpose: serve-near-userTyporithm · easy
Step 1 of 8 · intro card
Scaling
A CDN caches static content at edge points of presence close to users, cutting latency and offloading the origin. Pull CDNs fetch on the first request, push CDNs are pre-populated; Cache-Control headers govern TTL; and edge compute runs logic near the user.
A CDN (content delivery network) is a global mesh of caches at points of presence (PoPs) near users. By serving content from a nearby PoP instead of a distant origin, it cuts latency and absorbs traffic the origin would otherwise handle.
CDNs excel at static assets — images, stylesheets, scripts, and video — that are identical for every user. The origin can be filled two ways: a pull CDN fetches an asset from the origin on the first request for it, while a push CDN is pre-populated before any request arrives.
Cache-Control response headers set the TTL, telling each PoP how long to serve a cached copy before revalidating with the origin. Beyond caching, edge compute lets you run small pieces of logic at the PoPs themselves, so personalization or routing happens close to the user.
A CDN caches assets at edge PoPs near users.
Pull fetches on first request; push is pre-populated.
Cache-Control headers set the TTL.
cdn:
purpose: serve-near-user
content: static-assets-cache
origin: pull-or-push
ttl: cache-control-headers
edge: compute-at-edgeConnect each part of the code to the concept before you type.
A CDN caches content at points of presence close to users, cutting latency and offloading the origin server.
purpose: serve-near-userCDNs are best at static assets — images, CSS, JS, video — that are the same for every user and rarely change.
content: static-assets-cacheA pull CDN fetches from the origin on the first request for a path; a push CDN is pre-populated by you ahead of time.
origin: pull-or-pushCache-Control headers tell the CDN how long to keep an asset before revalidating with the origin.
ttl: cache-control-headersEdge compute runs small bits of logic at the points of presence, close to users, instead of at a central origin.
edge: compute-at-edgeRead the concept map and follow the code breakdown.
Type the implementation, repair mistakes and work through every recall exercise.
Use the final check without hints; revisit weak concepts in short practice sessions.