Networkingbeginner

What is a CDN?

Edge servers that cache and serve content close to the user

Reviewed by Abhijith N M · 24 October 2026 · Editorial standards

The Simple VersionNo jargon

A CDN is a network of edge locations between your users and your origin. Static assets, and sometimes API responses, are cached at the edge. A user in Mumbai gets a file from a nearby edge instead of a server in Virginia. The CDN also terminates TLS, absorbs some attacks and can compress responses. Cache keys decide what counts as the same object: URL, query string, headers and cookies.

What is a CDN? — Visual Breakdown

Click any step below to inspect
User (Brazil)
CDN Edge (São Paulo)
Origin Server (India)
Sequence of Events
Why It Matters in Production
CDNs reduce latency and origin load, but they add a new cache to invalidate. A stale page after a deploy is usually a cache-key or TTL problem, not a CDN outage. Version immutable assets and purge HTML explicitly. Be careful with cookies and Authorization headers in cache keys; otherwise one user's private response can be served to another. For dynamic APIs, cache only what is safe and set Vary correctly. Measure hit ratio and origin latency, not just global ping.

Quick Concept Check

Test your understanding in 15 seconds

What happens on a CDN 'cache miss'?

Related Concepts

Complementary topics

Written and edited by the nexGenCoders team. Spotted a mistake? Tell us and we will fix it.

What is a CDN? | nexGenCoders