Skip to main content
Glossary

Reverse Proxy

A server that sits between clients and backend servers, forwarding client requests to the appropriate server and returning the response.

Detailed Explanation

A reverse proxy intercepts incoming requests and forwards them to backend servers. Unlike a forward proxy (which sits between clients and the internet), a reverse proxy sits between clients and servers. It provides: SSL termination (handles HTTPS), load balancing (distributes across servers), caching (stores frequently requested content), security (hides backend server details), and compression (reduces response size).

NGINX is the most popular reverse proxy, used by over 30% of all websites. Other options include HAProxy, Traefik, and Cloudflare (acts as a reverse proxy CDN). Reverse proxies are essential for any multi-server deployment.

Why It Matters

Reverse proxies are fundamental to web infrastructure. They provide security, performance, and reliability benefits for any production deployment.

Real-World Example

A website runs NGINX as a reverse proxy in front of 5 Node.js servers. NGINX handles SSL, terminates HTTPS, caches static assets, and distributes requests across the 5 servers. Users connect to NGINX; they never see the backend servers.

When to Use

For any production deployment with multiple servers, when you need SSL termination, load balancing, or caching. Even single-server apps benefit from a reverse proxy for security and performance.

Advantages

  • SSL termination offloads backend servers
  • Load balancing distributes traffic
  • Caching improves response times
  • Security: hides backend server details
  • Compression reduces bandwidth usage

Disadvantages

  • Adds a potential single point of failure
  • Configuration complexity
  • Can add latency if misconfigured
  • Debugging requires understanding the full request path
  • Requires monitoring and health checks

Frequently Asked Questions

What is the difference between a reverse proxy and a load balancer?

A load balancer distributes traffic across servers. A reverse proxy provides additional features: SSL termination, caching, security, and compression. A load balancer is often a type of reverse proxy.

Should I use NGINX or HAProxy?

NGINX is more feature-rich (web server + reverse proxy + cache). HAProxy is specialized for load balancing with advanced features (health checks, stick tables). For most use cases, NGINX is the better starting point.

Can a reverse proxy replace a load balancer?

For simple setups, yes. NGINX can handle load balancing with upstream blocks. For advanced features (health checks, session persistence, rate limiting), dedicated load balancers or cloud-managed options are better.

How does a reverse proxy improve security?

It hides backend server details (IP, technology stack), provides SSL termination, can block malicious requests (WAF), rate limits clients, and creates a single entry point that is easier to secure.

What is SSL termination?

SSL termination is when the reverse proxy handles HTTPS encryption/decryption. Clients connect via HTTPS to the proxy; the proxy communicates with backend servers via HTTP (or re-encrypts). This offloads SSL processing from backend servers.

Back to Glossary

Browse all terms in our software development glossary.

Browse All Terms