← Lessons

quiz vs the machine

Silver1110

System Design

Push vs Pull CDN

Two ways content reaches the edge: you push it, or the edge pulls it.

4 min read · intro · beat Silver to climb

Two Distribution Models

A CDN can fill its caches in two ways. The choice shapes how fresh content arrives and how much you manage manually.

Pull CDN

The edge fetches content from origin on the first request, then caches it.

  • No upfront upload since content is lazy loaded on demand
  • The first user in a region pays a miss penalty
  • Great for large libraries where only some assets are popular

Push CDN

You upload content to the CDN ahead of time, and it distributes copies.

  • No cold miss because the file is already placed
  • You manage what to push and when to expire
  • Good for large files or predictable launches like a software release

Choosing

Pull suits most websites with changing, long tail content. Push suits a small set of heavy, frequently downloaded assets where you cannot afford a first request miss.

Key idea

A pull CDN lazily caches content on first request while a push CDN pre places it; pull fits changing long tail assets and push fits heavy predictable files.

Check yourself

Answer to earn rating on the learn ladder.

1. In a pull CDN, when does the edge first obtain an object?

2. Which scenario best suits a push CDN?