A CDN distributes content across geographically dispersed edge servers so users receive data from the nearest location. Reduces latency (no cross-continent round trips), offloads origin traffic, and absorbs DDoS attacks. Cloudflare, Fastly, and AWS CloudFront serve from 200+ global PoPs.
Content Delivery Networks cache and serve content from edge servers positioned near end users. When a user in Tokyo requests an image from a site hosted in Virginia, the CDN serves it from a Tokyo PoP (Point of Presence) instead of crossing the Pacific. CDNs cache: static assets (images, CSS, JS, fonts), HTML pages (with configurable TTL), API responses (with cache keys), and video streams (HLS/DASH segments). Origin shielding reduces load on your server – the CDN requests from origin once and serves from cache to thousands of users. CDNs also provide: DDoS protection (absorb volumetric attacks across their network), WAF (web application firewall rules at the edge), TLS termination (edge certificates), and performance optimization (image compression, minification, HTTP/3). Modern CDNs (Cloudflare Workers, Fastly Compute) run application code at the edge – not just caching but computing responses in 200+ locations.
Reverse Proxy
A reverse proxy sits in front of backend servers, accepting client connections and forwarding requests to appropriate backends. Unlike a forward proxy (client-side), a reverse proxy is server-side and invisible to clients. Provides TLS termination, caching, compression, rate limiting, and security filtering. Nginx, Caddy, and Envoy are common reverse proxies.
Edge Computing
Edge computing runs application logic at CDN edge locations (200+ PoPs) rather than centralized data centers. Cloudflare Workers, Deno Deploy, and Fastly Compute execute code within milliseconds of users. Eliminates origin round trips for dynamic content. Limited by: no persistent connections, short execution time, restricted APIs.