Interview Prep/Networking/Load Balancing, Proxies & CDN

What does a CDN do and when does it help?

BeginnerScenarioLoad Balancing, Proxies & CDN
Answer

Situation read → A CDN caches content at edge locations close to users.

What I'd do →

  1. Static assets (images, JS, CSS, video) are cached at the edge and served without touching the origin
  2. Cache hits cut latency and origin load
  3. Set Cache-Control: public, max-age=31536000, immutable on hashed assets
  4. Dynamic content can still benefit from edge TLS termination and persistent origin connections
  5. Check with curl -sI https://cdn.example.com/app.js | grep -i x-cache

Why → The speed of light is the real bottleneck for global users, and a nearby cache removes the round trip.

Interview tip → Mention cache keys, since mistakes there cause cache misses or wrong content for other users.

All Networking questions Roadmap: Networking for DevOps

More on Load Balancing, Proxies & CDN