AI Hints
Home›System Design Tutorial›Closer and Bigger
System Design · Lesson 32 of 120

Reverse Proxies

A server in front of servers.

⏱ 2 min read▶ Video at 36:44🎓 Free
Watch this lesson in the System Design courseWatch on YouTube ↗Full System Design course

A reverse proxy is a server that sits in front of your application servers. Clients talk to the proxy, and the proxy talks to your servers. Nginx is the most famous example.

Reverse Proxies
From the video: Reverse Proxies
  • A server in front
  • Clients talk to the proxy
  • Nginx is famous

What a reverse proxy does

A reverse proxy takes on several jobs. It ends HTTPS, so your app servers don't need certificates. It compresses responses, to save bandwidth. It serves static files quickly. It caches responses. And it hides your real servers from the internet, which is safer.

Ends HTTPSone place for certificates
Compressionsmaller responses
Cachingrepeat answers fast
Hides serverssafer

Proxy vs load balancer

Is a reverse proxy the same as a load balancer? They overlap a lot. A load balancer's main job is spreading traffic across servers. A reverse proxy's main job is handling requests on the servers' behalf. In practice, tools like Nginx do both, and the words are often used loosely.

Load balancer

  • Spreads trafficMany serversHealth checks

Reverse proxy

  • Acts for the serversHTTPS, caching, compressionEven for one server

Summary

A reverse proxy handles HTTPS, compression, caching, and hides your servers. Tools like Nginx are both proxies and balancers. Next, adding servers automatically when traffic grows.

Key takeaways
  • In front of servers
  • Takes shared jobs
  • Overlaps with balancers
Next up: Autoscaling — more servers on demand