Push vs Pull CDN Models for Media
You'll learn: How CDNs populate their edge servers with media content using two fundamentally different approaches—and when to use each.
Core Concept
When you need media files delivered from a CDN, they must first get to the CDN's edge servers. There are two main models:
Pull (Lazy Caching): The CDN fetches content from your origin server only when a user requests it. First request is slow (cache miss), but subsequent requests are fast (cache hit). Think of it like a librarian who walks to the back room to fetch a book the first time someone asks, then keeps it on the front desk for future readers.
Push (Pre-Population): You upload content directly to CDN edge locations before anyone requests it. The CDN doesn't pull from origin—you proactively push files. Like stocking vending machines before customers arrive.
When to Use Each
Pull CDN works best for:
- User-generated content with unpredictable popularity
- Large catalogs where most content is rarely accessed
- Dynamic content that changes frequently
- When you want automatic cache invalidation
Push CDN works best for:
- Known popular content (new movie releases, viral videos)
- Small file sets that will definitely be consumed
- Static content that rarely changes
- When you want guaranteed first-request performance
- Live event preparation
Hybrid Approach
Modern media platforms often combine both: push trending videos and high-value content, pull everything else. Your Processing Pipeline from earlier lessons can trigger push operations for content predicted to be popular, while letting long-tail content use pull-based lazy loading.
Key Takeaway: Pull CDNs optimize storage and handle unpredictable traffic patterns; Push CDNs eliminate cold-start latency but require upfront bandwidth and prediction of what content will be accessed.