← Lessons

quiz vs the machine

Gold1380

Networking

Reverse Proxy vs Forward Proxy

Two proxies that sit on opposite ends of a connection.

4 min read · core · beat Gold to climb

Two kinds of middlemen

A proxy is an intermediary that relays traffic between clients and servers. The difference between the two kinds is whose side it represents.

Forward proxy

A forward proxy sits in front of clients and acts on their behalf toward the wider internet. Clients are configured to send requests through it.

  • Hides client identity from destination servers.
  • Enforces access policy and content filtering.
  • Caches frequently requested external content.

Reverse proxy

A reverse proxy sits in front of servers and represents them to the outside world. Clients think they are talking to the real server.

  • Distributes load across backend instances.
  • Terminates TLS so backends handle plain traffic.
  • Caches responses and shields servers from direct exposure.

Telling them apart

The simplest test is which side it serves. A forward proxy protects and represents the client, while a reverse proxy protects and represents the server. Many gateways and load balancers are reverse proxies.

Key idea

A forward proxy fronts clients reaching out, while a reverse proxy fronts servers being reached.

Check yourself

Answer to earn rating on the learn ladder.

1. Whom does a reverse proxy represent?

2. Which is a typical job of a forward proxy?