hardCase StudyDesignMidSeniorStaff
Your origin is in one region and readers are worldwide. What do you cache, and what happens the moment you must invalidate it?
CDN caching for global reads works when cacheable bytes are separated from personalised fragments. Use content-addressed assets, tag-based purges for pages that must change, and plan for purge storms because invalidation sends cold traffic back to the one origin region. It also connects http caching to the point an interviewer is testing.
6 min readUpdated 2026-08-15
Answer
Short answer
Cache the shared shell and static assets globally, keep personal data out of the cached object, use immutable asset URLs, and treat purges as origin load events that need protection.
Was this answer helpful?
Likely follow-ups
- An article is embedded on the homepage, three category pages and a feed. You correct the article. Which URLs need purging, and how does the system know?
- How do you serve a logged-in header on a page whose body you want cached for a day?
- A purge succeeds at 38 of 40 locations. How would you find out, and what do you tell the editor who asked for it?
- Your busiest reader region has one location and it is now the origin's biggest client. What changes in the topology?
Related questions
- What goes into a cache key, and what happens when two requests that should get different responses collide on one?hardAlso on http-caching and cache-keys6 min
- Where do you put the cache, and how big does it need to be?hardAlso on cdn and http-caching6 min
- A two-hour film must start playing within two seconds on a phone on 4G. What has to exist before the play button works?hardAlso on cdn6 min
- Photos are the payload, thumbnails are the traffic, and both must survive losing a disk. Where does each copy live?hardAlso on cdn5 min