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.
- 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).
| Term | Meaning |
|---|---|
| Tiered cache | A second layer of CDN servers behind the edge, shared by many edges. Akamai calls it parent |
| Hit | The cache has a fresh copy and replies at once |
| Miss | The cache has no copy and fetches the full file from the origin |
| Refresh hit | The copy expired, the origin returns 304, and the cache replies with the copy |
| TTL | How long a copy can stay fresh |
| Stale | A copy past its TTL |
| Offload | The share of requests the cache answers without the origin |
| Cache key | The key a cache uses to tell if two requests ask for the same file |
| Purge | Tell the cache to drop a copy or mark it expired |
| Negative caching | Store 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.