A Content Delivery Network (CDN) is a network of geographically distributed servers that deliver content from a location closer to the user, rather than only from the main origin server.
- Delivers content quicker by serving from a closer edge location.
- Reduces latency by shortening the network path between the user and the content.
- Lowers traffic and load on the origin server by offloading delivery to edge servers.
- Increases availability during traffic spikes by distributing requests across multiple servers.

Key Components
A CDN is built around a few core parts that work together to store, route, and serve content efficiently to users.
- Origin Server: The primary server where the original website/app files are hosted and updated.
- PoP (Point of Presence): A physical CDN location (data center site) that hosts CDN servers in a region or city.
- Edge Server: The CDN server inside a PoP that directly serves user requests and reduces latency.
- Cache: The temporarily stored copy of content on edge servers so repeated requests are served quickly without going back to the origin.
- CDN DNS / Request Routing: The mechanism that maps a user to the nearest or best PoP server based on location, latency, and server health.
Need of CDN
Without a CDN, every request goes to the origin server, even if it is located on another continent.

- Longer physical distance increases latency.
- More network hops lead to slower page loads.
- High traffic can overload the origin server.
With a CDN, user requests are routed to a nearby edge server, which delivers content much faster.

- Shorter data path improves response time.
- Traffic is distributed across multiple servers.
- Websites remain stable even during traffic spikes.
- Provides a faster and smoother user experience globally.
Working
A CDN speeds up delivery by keeping cached copies of your content on edge servers inside multiple Points of Presence worldwide, so users are served from a nearby location instead of always reaching the origin server.
- Cache distribution: Your content is copied (cached) to many PoPs, each PoP has multiple edge/cache servers for nearby users.
- User request starts: A user (e.g., in India) requests a video from your website.
- DNS routing chain: The request goes to the Local DNS resolver, then to your site’s Authoritative DNS.
- CDN selection: The Authoritative DNS redirects the DNS query to the CDN provider’s DNS (e.g., XYZ), which chooses the nearest/best edge server for that user.
- Edge delivery: The selected edge server delivers the video to the user (fast because it’s geographically close).
- Resolver remembers (DNS caching): The Local DNS caches the edge server mapping for some time (TTL), so future requests from that network go directly to the same/nearest edge.
- Fewer hops, lower latency: Because PoPs are near users, the path is shorter → less delay and faster load.
- If content isn’t cached (cache miss): The edge fetches the video from the origin server, serves it, and stores it for next time.
Advantages
- Faster load time: Content is delivered from a closer edge server, so pages/videos load quicker.
- Lower latency: Reduces delay because data travels fewer network hops.
- Reduced origin server load: Repeated requests are served from cache, so the main server handles less traffic.
- Better availability: If one edge/PoP is busy or down, traffic can be routed to another nearby location.
- Handles traffic spikes: Distributes high user demand across many servers, preventing overload.
- Lower bandwidth cost: Cached delivery reduces repeated data transfer from the origin server.
- Improved user experience: Faster and smoother browsing/streaming, especially for global users.
Limitations
- Extra cost: CDN services add recurring cost (bandwidth, requests, premium features).
- Cache inconsistency: Users may see old content if cache isn’t refreshed properly (TTL/purge issues).
- Less control at the edge: Debugging issues is harder because delivery happens on CDN servers, not your origin.
- Dynamic content complexity: Personalized/real-time data is harder to cache, so benefits reduce for fully dynamic pages.
- Regional gaps: If the CDN has weak PoP coverage in some areas, speed improvement may be limited there.
- Security/configuration risk: Wrong CDN rules (cache policy, headers, access rules) can expose data or break content delivery.
Applications
- Video streaming: Faster start time and less buffering for platforms like OTT and live streaming.
- Website acceleration: Speeds up delivery of static assets like images, CSS, JS, and HTML for faster page loads.
- Software/app downloads: Delivers large files (apps, updates, installers) efficiently from nearby edge servers.
- Gaming: Faster game patch downloads and lower latency for game assets and updates.
- E-commerce: Handles peak sale traffic and improves product page load speed to reduce drop-offs.
- APIs and microservices: Improves API response time globally using edge routing and caching where possible.
- Security at edge (common use): Helps reduce DDoS impact and protects origin by absorbing traffic at CDN edge.