teacher
Sign in

CDNs and Proxies

Put servers between users and your origin - to hide, filter and cache - and push static content close to the user.

25 min3 interactive

Proxies

A proxy is a server that sits in the middle and forwards requests on behalf of someone else. Which side it represents decides the name.

Forward proxyReverse proxy
Acts forThe clientThe server
HidesThe client's identity from the websiteThe servers from the client
Typical useCompany network filters, privacy, caching for an officeLoad balancing, TLS, caching, security in front of your app
Example toolsSquid, corporate proxyNginx, HAProxy, Envoy, Cloudflare

You will almost always design with a reverse proxy. The user talks to example.com; behind it, the proxy picks one of many app servers.

What a reverse proxy usually does for you:

  • TLS termination: it handles HTTPS encryption, so the app servers speak plain HTTP inside the private network.
  • Load balancing across app servers (the previous lesson).
  • Caching of responses, compression (gzip, Brotli) and rate limiting.
  • Hiding internal addresses, so attackers see one entry point.
1 of 8