660 ms
before the first byte, Chennai to Virginia
TCP, TLS and the request each cost a 220 ms round trip. From an edge 10 ms away, a hit takes 30 ms; a miss, 250.
Four points of hit ratio, five times the origin.
At 100,000 requests a second, 95% hits send 5,000 to the origin and 99% send 1,000. Bytes, which are the bill, follow the same rule.
Tiers turn hundreds of misses into one origin fetch.
Edges keep what’s locally popular, a regional tier keeps the long tail, and an origin shield merges concurrent misses. Each miss pays one extra hop.
Does no-cache mean don’t cache?
Bad: no-cache = don’t store
So personal pages get no-cache, and everyone feels safe.
Good: no-cache = check first
It stores, then revalidates before each reuse. Only private or no-store keeps it out.
You deploy new JavaScript and purge every PoP. Phones still run the old file.
The trick
Fingerprint it: app.3f9a1c.js, cached a year with immutable. A new build is a new name; only HTML stays short.
The cache key decides who shares a copy.
Key on Accept-Language and one English page becomes four copies. Leave out what changes the response, and one visitor’s page goes to everyone.
The CDN is a dependency too
- Fastly, June 2021: 85% of its network erred
- Multi-CDN, or a tested runbook to the origin
- Bypassing a 99% CDN sends the origin 100×
Remember
A CDN puts caches near users, so hits take milliseconds and the origin sees only misses. Fingerprint assets for a year, keep HTML short, never cache the private, and lock the origin to the CDN.