Definition
CDN edge caching stores content at geographically distributed edge locations so users can fetch it from a nearby cache instead of a distant origin.
For video platforms, edge caching is essential because playback creates enormous repeated reads:
many viewers -> same video segments -> same popular regions
If every segment request goes back to origin storage, the origin and network path become bottlenecks. The CDN absorbs repeated reads close to viewers.
The Pain That Forces This Concept
A viral video can create millions of requests for the same small set of segments. The first few segments are especially hot because many users start playback but not all finish.
Without edge caching:
- startup latency is higher
- origin storage receives repeated reads
- cross-region bandwidth cost grows
- popular content overloads central services
- viewers far from origin get worse playback
CDN edge caching turns global playback into a mostly-local read path.
Mental Model
The origin is the authority. The edge is the nearby read accelerator.
viewer -> nearby edge cache -> origin only on miss
On a cache hit, the edge serves the segment directly. On a miss, the edge fetches from origin, stores the response, and serves the viewer.
How It Works
Common flow:
1. Playback manifest points to CDN URLs.
2. Player requests segment_004_720p.
3. Nearby edge checks cache.
4. If hit, edge returns the segment.
5. If miss, edge fetches from origin or shield cache.
6. Edge stores the segment according to cache policy.
7. Future viewers in that region get a hit.
Popular content becomes cheap and fast because many viewers share cached segments. Long-tail content may miss more often, so origin and shield layers still need capacity.
Tradeoffs
| Choice | Benefit | Cost |
|---|---|---|
| Long cache lifetime | Better hit ratio | Harder to replace bad assets |
| Short cache lifetime | Faster changes | More origin pressure |
| Stable segment URLs | Better cache reuse | Needs careful versioning |
| Signed URLs | Better access control | Can reduce cache sharing |
| Prewarming | Lower startup misses | Costs bandwidth and operational work |
CDN caching works best when media assets are immutable. If a segment changes, publishing it under a new versioned path is usually cleaner than trying to mutate cached bytes everywhere.
Operational Reality
Operators watch:
- edge cache hit ratio
- origin request rate
- cache fill latency
- regional playback startup time
- CDN error rate
- bandwidth by region
- hot segment distribution
- invalidation volume
Failure modes:
- a bad segment is cached globally
- signed URL policies reduce cache reuse
- a regional edge misses too often and overloads origin
- cache invalidation removes too much content during an incident
- first segments are hot while later segments are cold
- long-tail content causes unpredictable origin traffic