CMD Guide
HomeSystem DesignCDN

Push CDN vs Pull CDN

Both models put your bytes on edge servers close to users; they differ only in who triggers the copy and when — a pull CDN lazily fetches an object from your origin on the first cache miss and caches it under a TTL, while a push CDN treats the edge as authoritative storage that you populate ahead of time and never falls back to an origin. That single decision — lazy fetch vs. eager upload — drives every trade-off below: who bears origin load, how stale content can get, and who owns cache lifecycle.

The mechanism, request by request

Follow one object, /videos/launch.mp4 (say 200 MB), through both models. In a pull CDN the edge is a cache: on a miss it opens a connection back to origin, streams the object through to the user while writing it to local disk, and stamps it with a TTL derived from your Cache-Control: max-age header. In a push CDN the edge is origin storage: you (or your CI pipeline) uploaded the object to a storage bucket the CDN replicates, so there is no origin behind it to miss to.

diagram
diagram
diagram
diagram

Worked example: origin load and cost for a 200 MB file

Suppose launch.mp4 is 200 MB and gets 1,000,000 downloads across 50 edge PoPs in a month. Assume pull TTL = 1 hour and the file is requested at every PoP steadily, so each PoP re-fetches it once per hour. That is 50 PoPs × 720 hours = 36,000 origin fetches/month — versus push, where you upload it 50 times, once (one replication per PoP), and never again until you change it.

MetricPull CDN (TTL 1h)Push CDN
Origin fetches / month~36,000 (50 PoPs × hourly re-pull)50 (one push per PoP)
Origin egress / month36,000 × 200 MB = ~6.9 TB50 × 200 MB = ~9.77 GB
First-byte latency, cold object~420 ms (edge→origin round trip + transfer)~25 ms (already at edge)
Edge storage billedOnly hot objects, evicted under LRUEvery pushed object, whether requested or not
Staleness after you fix a typo≤ TTL (up to 1h) unless you purge0 — but only after your re-upload finishes replicating

The pull number collapses if you raise the TTL: at TTL = 24h it drops to 50 × 30 = 1,500 fetches (~293 GB). This is the real lever — pull origin load is a function of TTL and PoP count, not of user traffic. Push origin load is a function of how often you publish, full stop.

Pitfalls

When to use which — the decision rule

Choose PULL when your catalog is large and mostly dynamic or long-lived-but-cacheable (a media site, an e-commerce product catalog, API responses, a typical web app), traffic is skewed so a small hot set dominates, and you want zero-config setup with automatic cache lifecycle. The cost you accept: a slow first-request per PoP, and origin must stay up and reachable to backfill misses. This covers the vast majority of workloads, which is why Cloudflare, Fastly, and Amazon CloudFront default to pull.

Choose PUSH when objects are large, few, and infrequently requested (software installers, game patches, firmware, backup archives, big video assets), where a pull model would suffer a slow cold-miss on every object because nothing stays hot enough to keep cached — and where you'd rather pay predictable storage than unpredictable, latency-inducing origin fetches. You also gain the ability to pre-warm content before a launch spike. The cost: you own upload orchestration, versioning, and storage lifecycle. Historically this is Akamai NetStorage / Rackspace Cloud Files territory.

Prefer pull over push unless you can name a specific reason push wins, because pull's operational simplicity is worth a lot. Prefer push over a pull CDN with a huge TTL when you need a guaranteed cold-hit and can't tolerate even one slow origin fetch per PoP (e.g., a synchronized global game-patch drop). In practice most modern shops run pull and solve push's problems with cache pre-warming (issuing synthetic requests to force objects hot before a spike) — a hybrid that keeps pull's simplicity while borrowing push's readiness.

Takeaways


Re-authored and deepened for this guide. Sources: Cloudflare and Fastly documentation on cache TTL, purging, and request collapsing; AWS CloudFront developer guide (origin fetch and cache behavior); Akamai NetStorage product docs; and standard system-design references (Alex Xu, System Design Interview; Grokking the System Design Interview). Latency and egress figures are illustrative order-of-magnitude estimates, not vendor benchmarks.

🤖 Don't fully get this? Learn it with Claude

Stuck on Push CDN vs Pull CDN? Open Claude, copy a block below, and it'll teach you this exact concept — visually and interactively.

🎨 Explain it visually

Build the mental picture, not memorization.

I just read a lesson on **Push CDN vs Pull CDN** (System Design) and want to truly understand it. Explain Push CDN vs Pull CDN from first principles using ONE vivid real-world analogy and a visual mental model — draw it as ASCII art or a clear step-by-step diagram — with a concrete example using real numbers. Then ask me one question to check I got the mental picture, and wait for my reply. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🤔 Walk me through it (interactive)

Socratic — adapts to where you're stuck.

Teach me **Push CDN vs Pull CDN** interactively. Ask me ONE guiding question at a time, wait for my answer, and adapt to my confusion — build the idea with me step by step instead of explaining it all at once. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🧪 Quiz me & fix my gaps

Active recall exposes what you missed.

Quiz me on **Push CDN vs Pull CDN** with 5 questions, easy to tricky, ONE at a time. Tell me if each answer is right; at the end, explain clearly what I got wrong and why. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🧠 Make it stick

Intuition + hook + flashcards for long-term memory.

Help me remember **Push CDN vs Pull CDN** for the long term: give the one-sentence intuition, a memorable hook/mnemonic, a tiny worked example, and 3 active-recall flashcards (Q -> A). If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.

📝 My notes