SD Core

CDN (Content Delivery Network)

Caches static and cacheable content at edge PoPs worldwide so users download from a nearby server.

Interview tip Lead with a 30-second definition, then one real system example and name 2–3 designs where CDN (Content Delivery Network) is non-negotiable.

① What it is (30 seconds)

Caches static and cacheable content at edge PoPs worldwide so users download from a nearby server.

② How it works in system design

DNS routes user to nearest edge. Edge serves cached object or fetches from origin on miss. Versioned asset URLs avoid purge storms. Great for video segments, images, JS bundles.
Typical placement
ClientEdge / GatewayCDNServicesData stores

③ Concrete system design example

Scenario: YouTube video chunks: each 2s segment cached at edge; 90% of views never touch origin. Thumbnail and player JS served from CDN with immutable cache headers.

④ Important interview Q&A

QuestionAnswer
What not to put on CDN?Personalized HTML, auth responses, POST bodies, private user data.
Cache invalidation strategy?Fingerprint URLs (app.[hash].js) instead of manual purge.
CDN vs edge compute?Workers at edge for redirects, A/B, geo routing without round-trip to origin.

⑤ Seen in these system designs

In interviews, after explaining the concept, say: "This shows up directly in …" and link two designs.

⑥ Revision checklist

  • Edge PoP concept
  • Cache-Control headers
  • Versioned static assets
  • Origin shield
  • Geo DNS
cdnedgelatency