Top 6 Cdn Interview Questions
Browse 6 real-world technical and behavioral interview questions about Cdn. Review scenarios, edge cases, and architectural best practices.
A two-hour film must start playing within two seconds on a phone on 4G. What has to exist before the play button works?
Video streaming startup time is won before playback: transcode into an adaptive ladder, cut aligned segments, package a manifest, and cache the first low-bitrate segment near the viewer. At play time the system can only afford manifest fetch, licence check, first segment and decoder start. It also connects adaptive bitrate to the point an interviewer is testing.
How do you execute a global CDN cache invalidation for a critical security patch without melting your origin servers under a thundering herd?
A cynical look at global cache invalidation, the necessity of origin shielding, and why relying on manual purges is an architectural anti-pattern. Use this distributed systems answer to show the decision, trade-off, and evidence rather than a memorised definition. It also connects caching to the point an interviewer is testing.
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.
Photos are the payload, thumbnails are the traffic, and both must survive losing a disk. Where does each copy live?
Photo storage should separate originals from thumbnails. Originals are large, rarely read and irreplaceable, so keep a canonical erasure-coded object; thumbnails are small, hot and rebuildable, so replicate them, cache them at the edge and address them by content or transform version.
Design the asset delivery and deploy strategy for a large single-page app. What happens to a user who has the tab open when you ship?
Cache hashed assets for a year and never cache the entry document, retain several previous builds so a stale tab can still fetch its chunks, and treat a failed dynamic import as the signal to prompt a reload rather than as an error to swallow.
Where do you put the cache, and how big does it need to be?
Choose the layer by who else can reuse the same bytes and how tolerable staleness is that far from the user, then size it from the working set rather than the dataset. Watch the miss rate, not the hit rate: origin load is proportional to misses, so 99 percent falling to 95 is a fivefold traffic increase.