Interview Prep/Networking/Load Balancing, Proxies & CDN

Forward proxy versus reverse proxy: what is the difference?

BeginnerScenarioLoad Balancing, Proxies & CDN
Answer

Situation read → They sit on opposite sides of the connection.

What I'd do →

  1. A forward proxy (Squid, corporate proxy) sits in front of clients and controls their outbound access, for example HTTPS_PROXY=http://proxy:3128
  2. A reverse proxy (Nginx, Envoy, ALB) sits in front of servers, hiding them and handling TLS, caching and routing
  3. Test a forward proxy with curl -x http://proxy:3128 https://example.com
  4. Reverse proxy sits at the public edge of your apps

Why → A forward proxy represents clients to the world; a reverse proxy represents servers to the world.

Interview tip → Mention that service meshes are reverse proxies in sidecar form.

All Networking questions Roadmap: Networking for DevOps

More on Load Balancing, Proxies & CDN