FE Interview Hub
Browser InternalsBasic

What is a CDN?

AI Practice

What is a CDN?

A CDN (Content Delivery Network) is a network of geographically distributed server nodes that cache and deliver static resources (images, CSS, JS, videos, etc.), allowing users to retrieve resources from the nearest node to their location.

How CDN Works

  1. User sends a request (e.g., loading an image)
  2. DNS resolves the request to the nearest CDN edge server
  3. If the node has a cache (Cache Hit), it returns the resource directly
  4. If no cache (Cache Miss), it fetches from the origin server, caches it, then returns it

Key Benefits of CDN

  • Reduced latency: Users get resources from the nearest node, minimizing travel distance
  • Reduced origin server load: CDN nodes handle most requests, preventing origin server overload
  • Higher availability: Multiple node redundancy means a single node failure doesn't affect service
  • DDoS protection: CDN can absorb large volumes of malicious traffic to protect the origin server

Common CDN Use Cases

  • Static asset acceleration (images, fonts, CSS/JS)
  • Video streaming services
  • Software downloads
  • Global website acceleration

✦ AI Mock Interview

Type your answer and get instant AI feedback

Sign in to use AI scoring