Skip to content
All writing ‹ Part 05 of 18 · A Cache Is a Chain, Not a Box
Engineering · 4 min read

CDN Terms on One Page

A one-page cheat sheet of CDN terms: edge, tiered cache, hit, miss, refresh hit, offload, cache key, and purge, placed on the path a request takes.

When I got stuck reading CDN docs, the concept was rarely the hard part. The terms just did not match. This table is my cheat sheet.

First see which parts a request passes through. Then see where each term sits.

client (browser) request + header← 02 edge servercache ①: reply at once if a fresh copy exists← 01 miss, or expired and needs refresh← 04 tiered cachecache ②: many edges share one copy miss load balancerentrance to the origin, picks a backend by host/path/header← 03 storagereturns files only (bucket) computeprograms, can rewrite content ...
A request passes two caches before the load balancer picks the backend that does the real work.
  • The lower the request goes, the slower and more costly it is. The job of a cache is to stop the request as high as possible.
  • Some platforms also have cache ③ on the load balancer. This series calls it the LB cache. The problem is there (A Bypass Header Works Only Where a Rule Reads It).
TermMeaning
Tiered cacheA second layer of CDN servers behind the edge, shared by many edges. Akamai calls it parent
HitThe cache has a fresh copy and replies at once
MissThe cache has no copy and fetches the full file from the origin
Refresh hitThe copy expired, the origin returns 304, and the cache replies with the copy
TTLHow long a copy can stay fresh
StaleA copy past its TTL
OffloadThe share of requests the cache answers without the origin
Cache keyThe key a cache uses to tell if two requests ask for the same file
PurgeTell the cache to drop a copy or mark it expired
Negative cachingStore errors such as 404 for a short time too
  • The cache key includes the full URL by default. If the query string differs each time, one file is stored as many copies.
  • The CDN report counts a refresh hit as a hit, but it still made a trip to the origin. Later I used “time to first byte ≥ 50 ms” to tell whether a request left the edge (Symptom: HTML, CSS, and JS Keep Going to Origin).

A hit on a report did not always stay at the edge. Align the terms first, then trust the numbers.

Related: What a CDN Is, Cache Headers: Who Sets, Who Reads, Symptom: HTML, CSS, and JS Keep Going to Origin, What I Learned: A Cache Is a Chain, Not a Box. Or go back to the series overview.

↑↓ navigate ↵ open esc close