CDNs & Proxies

Lesson · Intern

Serving content closer to users.

CDN

A Content Delivery Network keeps copies of static content (images, JS, video) on edge servers around the world. Users fetch from a nearby edge, which cuts latency and offloads your origin.

Push vs pull

Pull CDN: edge fetches from origin on first request, then caches (simple, most common). Push CDN: you upload content ahead of time (good for rarely-changing large files).

Proxies

A forward proxy sits in front of clients (privacy, filtering). A reverse proxy sits in front of servers (load balancing, caching, TLS termination, protection). Nginx and Envoy are common reverse proxies.