Try
↑ ↓ move↵ openesc close
In this lesson · topic 7 of 7
  1. 1. One origin, every user
  2. 2. Hit, miss and the TTL
  3. 3. Move the TTL and watch the origin
  4. 4. A noisy key, a cold edge, a stale page
  5. 5. Cache keys and purging
  6. 6. Stale while revalidate and the origin shield
  7. 7. Edge caches in review

Topic 7

Edge caches in review

3 min read

Predict first

What does lengthening a cache TTL trade away?

Predict first

A site starts adding a unique tracking value to every URL. What happens at the CDN, with no other change?

Predict first

What does an origin shield change?

Take away

  • A cache answers repeat requests so the origin does less. The hit ratio is the share it answers.
  • A TTL trades origin load against freshness. A longer one raises both the hit ratio and the staleness.
  • The cache key should hold only what changes the response. Extra values split one object into many entries.
  • Purge on change, or version file names, to get freshness without a short TTL. Keep a TTL as a safety net.
  • Stale while revalidate lets users skip the refresh wait. The refresh still costs the origin one request.
  • A shield cuts origin requests when many edges miss on the same object. It adds a hop on a double miss.

Sources

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms