Cache Hierarchies and Tiered Caching
What you'll learn: How CDNs use multiple layers of caches to balance performance, cost, and origin server protection.
The Core Idea
Instead of having just one layer of edge servers hitting your origin, CDNs use multiple tiers of caching arranged in a hierarchy. Think of it like a supply chain: local stores (edge caches), regional warehouses (regional caches), and the manufacturer (origin server). Each tier serves requests from the tier above it, creating progressively fewer but more centralized cache points.
Why Multiple Tiers?
Problem: If thousands of edge servers all miss cache simultaneously, they'd stampede your origin server with identical requests.
Solution: Insert intermediate cache tiers between edge and origin.
Typical Tiered Architecture
-
Edge Tier (closest to users)
- Thousands of locations worldwide
- Handles most traffic via cache hits
- Smallest storage capacity per location
-
Regional Tier (mid-level aggregation)
- Dozens of strategic locations
- Aggregates requests from multiple edge PoPs
- Larger cache storage, fewer locations
-
Origin Shield (previously covered)
- Single or few locations per region
- Final cache before hitting origin
- Maximum origin protection
The Tradeoff Balance
More tiers = Better origin protection but adds latency hops on cache misses.
Fewer tiers = Faster cache misses but more origin load.
Most CDNs use 2-3 tiers depending on content popularity and geographic distribution.
Real-World Flow
User requests video → Edge cache miss → Regional cache hit → User served (origin never contacted). The regional cache absorbed what would've been an origin request.
Key Takeaway: Multi-tier CDN caching creates a hierarchy where each layer reduces load on the next, balancing cache hit rates at the edge with strong origin server protection through regional aggregation points.