Skip to content
The Network

03.05 · Concept

CDNs and the Edge

Explain anycast and the cache key, and say what the edge cannot do for you.

No video curated for this lesson yet

This lesson is written, ordered and part of the path - the video slot is the only thing still open. We are working through Deployment lesson by lesson; 29 of 56 have their video so far.

The written notes below cover this idea in full - you lose nothing by reading instead of watching.

CDNs reduce latency and origin load by routing users to nearby edge locations and reusing responses whose cache keys match. Anycast explains how one IP can land at different sites, while cache key design decides what is actually shared. The edge cannot rescue uncacheable, per-user, or misconfigured dynamic traffic.

What this lesson answers

  • how does CDN anycast routing work
  • what should be in a CDN cache key
  • what can edge functions not fix

Notes

CDNs and the Edge — CDNs exist to serve cacheable content from locations near users using routing and caching; without them, every request crosses long network paths to origin, increasing latency, bandwidth cost, and origin overload during traffic spikes.

Key Concepts: - Anycast lets many edge locations advertise the same IP prefix via BGP, so a user in Paris and a user in Tokyo can both connect to but reach different nearby CDN points of presence.

Common questions

How does anycast help a CDN route traffic?
Anycast lets multiple CDN locations announce the same network destination. The user connects to one address, but internet routing sends the connection to a suitable edge location according to BGP policy. That is often nearby, but not guaranteed to be the geographically closest site.
Why does the cache key matter so much?
The cache key is the identity used to find a stored response. If it includes too little, users may receive the wrong content. If it includes too much, such as every cookie, the CDN may miss constantly and forward requests to origin instead of serving shared cached objects.
Can edge functions make dynamic pages fast automatically?
Edge functions can rewrite, redirect, normalise, route, and adjust cache behaviour close to the user. They cannot remove the cost of origin work when every response is private, uncacheable, or unique per request. In that case the edge still has to call the origin.