Interview Q&A / System Design
System Design interview questions
Caching, scaling, databases and classic design problems for beginners.
Prefer rapid revision? Practise System Design short interview answers →
- How does a CDN work and what does it improve?
A CDN keeps copies of your content on servers near users around the world. A user is routed to the closest edge, which serves cached content quickly and only contacts your origin server on a miss.
BeginnerQuick answer1 min read - How do you update a file that is already cached on a CDN?
Either purge the URL on the CDN, which is slow and rate limited, or better, put a version or content hash in the filename, such as app.3f9a1c.js. A new name is a new cache entry, so there is nothing to invalidate.
IntermediateQuick answer1 min read