Skip to main content
networking

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.

Definition

A reverse proxy receives all client requests and forwards them to one or more backend servers. The client communicates only with the proxy – it never knows the backend server's IP or port. This provides: TLS termination (handle certificates at one point), request routing (path-based routing to different services), caching (serve static content without hitting backends), compression (gzip/brotli at the proxy level), security (WAF rules, rate limiting, IP blocking), and connection management (keep-alive multiplexing to backends). In microservice architectures, the reverse proxy (or API gateway) is the single entry point that routes /users to the user service, /orders to the order service, etc. Nginx handles 40%+ of internet traffic as a reverse proxy. Caddy provides automatic HTTPS. Envoy powers service meshes (Istio). HAProxy excels at high-connection-count TCP proxying.

Examples

  • Nginx: location /api { proxy_pass http://backend:8080; }
  • Caddy: reverse_proxy /api/* localhost:8080
  • Envoy: route_config with weighted_clusters for canary deploys

Related Protocols

Related Terms