# Proxy vs Reverse Proxy vs Load Balancer: What's Actually Different

URL: https://www.devopsness.com/blog/proxy-vs-reverse-proxy-vs-load-balancer
Author: Kiril Urbonas
Published: 2026-05-15
Updated: 2026-11-15
Categories: DevOps
Tags: Networking, Proxy, Reverse Proxy, Load Balancing, Scalability, Infrastructure

Summary: Three terms that get mixed up constantly. The actual differences, where each one sits in the request path, when you reach for which, and where the same tool plays all three roles.

---
# Proxy vs Reverse Proxy vs Load Balancer: What's Actually Different

A forward proxy works for clients, sending their outbound requests to the internet. A reverse proxy works for servers: clients connect to it believing it is the site. A load balancer spreads requests across several identical backends. The last two overlap, so a reverse proxy with three backends is also a load balancer.

> [!VERIFIED]
> nginx 1.30.6 stable and 1.31.8 mainline, against the nginx.org HTTP load balancing guide and ngx_http_upstream_module reference, plus RFC 9110's definitions of proxy and gateway. Checked October 2026.

These terms blur partly because the same software (Nginx, HAProxy, Envoy) plays all three roles depending on configuration. The differences still matter, because each maps to a different design decision.

## The mental model in one sentence each

- **Forward proxy** sits between *clients* and the internet. Clients know about it; the destination doesn't.
- **Reverse proxy** sits between *the internet* and your *backend servers*. The client thinks the reverse proxy *is* the server. RFC 9110 calls this role a "gateway".
- **Load balancer** distributes incoming traffic across *multiple identical backends*. It's a specific job, not a specific position in the stack.

The first two are about *who knows about whom*. The third is about *how many backends share the work*.

## Forward proxy

A forward proxy is something a client deliberately routes its traffic through. The proxy talks to the destination on the client's behalf, and the destination sees the proxy's IP, not the client's.

```mermaid
flowchart LR
    C1[Client A]
    C2[Client B]
    C3[Client C]
    FP[Forward Proxy]
    NET[Internet / Destination]
    C1 --> FP
    C2 --> FP
    C3 --> FP
    FP --> NET
```

Why anyone runs one:

- **Corporate egress control.** Block sites, filter content, log outbound traffic for compliance.
- **Caching.** Many clients pulling the same npm packages, container images or OS mirrors: the proxy fetches once and serves many.
- **Privacy.** The destination only sees the proxy's IP.
- **Geographic routing.** Make outbound requests appear to come from a specific country.

Common implementations: Squid (the classic), corporate products like Zscaler, internal proxies built on Nginx or Envoy. Clients stay simple (set `HTTPS_PROXY=...`), and you get one choke point to audit. The costs: it becomes a single point of failure for internet access unless you scale it out, it adds latency to every outbound call, and HTTPS inspection requires installing the proxy's CA certificate on every client.

You rarely think about forward proxies unless you work inside an enterprise network that has one, or run a system that makes many outbound calls worth caching or auditing.

## Reverse proxy

A reverse proxy sits in front of your servers. Browsers connect to it and receive responses from it, while it forwards each request to a backend behind the scenes.

```mermaid
flowchart LR
    NET[Internet Clients]
    RP[Reverse Proxy<br/>TLS, caching, WAF]
    B[Backend Server]
    NET --> RP
    RP --> B
```

Why everyone runs one:

- **TLS termination.** The proxy handles HTTPS; backends speak plain HTTP. Certificates live in one place.
- **Hidden topology.** Backend IPs aren't exposed to the internet.
- **Rewrites, headers and redirects** without touching backend code.
- **Caching and compression** (gzip, Brotli) at the edge.
- **WAF and rate limiting** at the front door.
- **Routing.** `/api` goes to backend A, `/static` to backend B.

Common implementations: Nginx, HAProxy, Envoy, Caddy, Traefik, and managed versions like AWS ALB, CloudFront and Cloudflare. Our [Nginx reverse proxy guide](/blog/nginx-reverse-proxy-guide) walks through a production config. The costs are another component to monitor and make highly available, a small extra hop of latency, and harder debugging: is the 502 coming from the proxy or the backend? When the answer is "the proxy can't reach the backend", the playbook in [fixing ingress 502 and 504 errors](/blog/fix-ingress-502-504) applies well beyond Kubernetes.

If anything you run is on the public internet, you are almost certainly behind a reverse proxy already. CloudFront in front of an app is one. Nginx in front of a Node process is one.

## Load balancer

A load balancer distributes incoming traffic across multiple backend servers, trying to give each a fair share of work.

```mermaid
flowchart LR
    NET[Incoming Traffic]
    LB[Load Balancer]
    B1[Backend 1]
    B2[Backend 2]
    B3[Backend 3]
    NET --> LB
    LB --> B1
    LB --> B2
    LB --> B3
```

Two flavors:

- **L4 (TCP) load balancer.** Works on connections and never looks inside requests. Fast, protocol-agnostic. AWS NLB is L4.
- **L7 (HTTP) load balancer.** Inspects HTTP, so it can route on path, headers or cookies and do sticky sessions. AWS ALB is L7.

You run one for horizontal scale, for high availability (a dead backend gets routed around), for rolling deploys (drain one backend at a time), and for canaries (send a slice of traffic to the new version). The algorithm matters more than people expect; nginx defaults to round-robin and also offers `least_conn`, `ip_hash` and `hash`, which we compare in [load balancing algorithms](/blog/load-balancing-algorithms). The costs: the balancer itself must be highly available, sticky sessions add state, and L7 inspection costs CPU that L4 pass-through doesn't.

## Where they overlap

A reverse proxy with multiple backends configured *is also a load balancer*. One Nginx config does both:

```nginx
# /etc/nginx/conf.d/app.conf
upstream app_backends {
    least_conn;
    server app1.internal:3000 max_fails=3 fail_timeout=30s;
    server app2.internal:3000 max_fails=3 fail_timeout=30s;
    server app3.internal:3000 max_fails=3 fail_timeout=30s;
}

server {
    listen 443 ssl;
    server_name www.example.com;
    ssl_certificate     /etc/nginx/tls/example.com.crt;
    ssl_certificate_key /etc/nginx/tls/example.com.key;

    location / {
        proxy_pass http://app_backends;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}
```

That's a reverse proxy (terminating TLS, forwarding to backends) and a load balancer (spreading requests across three servers, marking one unavailable after three failures). Same binary, same file, two roles.

In practice:

- *One* backend: a reverse proxy, not really a load balancer.
- *Many backends, internal only*: a load balancer between services.
- *Many backends, public-facing*: both, and arguing about the name wastes time.

## A quick comparison table

| Aspect | Forward Proxy | Reverse Proxy | Load Balancer |
|---|---|---|---|
| Who knows about it | Client | Client thinks it's the server | Either, depends on tier |
| Sits between | Client and internet | Internet and your servers | Traffic source and N backends |
| Hides | Client identity | Server topology | Single-backend dependency |
| Primary use | Egress control, caching | TLS termination, security, routing | Distributing load, HA |
| Example | Squid, Zscaler | Nginx, ALB, CloudFront | HAProxy, NLB, ALB |

## How to pick

- **Need to control or audit outbound traffic from many machines?** Forward proxy.
- **Putting a service on the public internet and need TLS, security or routing?** Reverse proxy.
- **Multiple identical backends that need traffic spread across them?** Load balancer.
- **All of the above?** One tool (Nginx, Envoy or a cloud ALB) does it.

For most production teams the answer is a cloud-managed L7 load balancer, which is the reverse proxy and the load balancer at once. Where that sits in your network is covered in our [AWS VPC explainer](/blog/aws-vpc-explained-beginner-guide). The forward proxy is a separate decision that mostly matters in enterprise networks.

## Questions people ask

### Is a load balancer a reverse proxy?

An L7 load balancer is a reverse proxy with more than one backend: it terminates the client connection, reads the HTTP request and opens a new connection to a chosen server. An L4 load balancer like AWS NLB is not, strictly, because it forwards TCP connections without parsing requests. In everyday use, ALB, Nginx and HAProxy are both at once.

### Is Nginx a reverse proxy or a load balancer?

Both, depending on config. With `proxy_pass` pointing at a single server, Nginx is a reverse proxy. Point `proxy_pass` at an `upstream` block with several servers and it load balances, round-robin by default, with `least_conn`, `ip_hash` or `hash` available. It can also run as a forward proxy, though Squid is the more common choice there.

### Is a CDN a reverse proxy?

Yes. CloudFront, Cloudflare and Fastly accept the client's connection at an edge location, serve cached responses where they can, and forward the rest to your origin. That is a reverse proxy with caching spread across a global network. Many also load balance across multiple origins, which is why CDN vendors increasingly sell themselves as full application front doors.

## What to read next

- [Istio vs Linkerd](/blog/istio-vs-linkerd): when every service gets its own little proxy. A sidecar (Envoy in Istio, linkerd2-proxy in Linkerd) acts as a reverse proxy for inbound calls and a forward proxy for outbound ones.
- [Kubernetes Ingress vs Gateway API](/blog/kubernetes-ingress-vs-gateway-api-migration): how Kubernetes models the reverse proxy and load balancer at the cluster edge.

The job, not the binary, determines which name applies. Nginx in front of one backend is a reverse proxy; the same Nginx with several backends is a load balancer; an Nginx that clients explicitly route through is a forward proxy.

## Sources

- [nginx: Using nginx as HTTP load balancer](https://nginx.org/en/docs/http/load_balancing.html)
- [nginx: ngx_http_upstream_module reference](https://nginx.org/en/docs/http/ngx_http_upstream_module.html)
- [RFC 9110: HTTP Semantics (intermediaries: proxy, gateway, tunnel)](https://datatracker.ietf.org/doc/html/rfc9110)
- [Linkerd architecture: linkerd2-proxy](https://linkerd.io/2-edge/reference/architecture/)

