Forward proxies vs reverse proxies — what each one is actually for
A reverse proxy already showed up earlier in this domain, representing servers. A forward proxy is the mirror image — representing clients instead — and the two get confused constantly despite doing opposite jobs.
Beginner
2 min read
Same mechanism, opposite side
A proxy, in general, is a middlebox that sits between two parties and
relays requests on behalf of one of them. Both forward and reverse proxies
do exactly that — the entire difference is which side they represent.
Forward proxy: represents the client
A forward proxy sits in front of one or more clients and forwards their
requests outward. The server on the other end sees the proxy's identity, not
the real client's — the proxy is acting for the client.
Common real examples:
A corporate network proxy that every employee's traffic passes through
— used for content filtering, logging, or enforcing which sites are
reachable at all.
A consumer proxy service, conceptually similar to the VPN from the
previous lesson — the destination server sees the proxy's IP, not yours.
Reverse proxy: represents the server
A reverse proxy — already covered earlier in this domain, as the general
role a load balancer plays — sits in front of one or more servers and
forwards requests to whichever backend should actually handle them. The
client sees the reverse proxy's identity, not the real backend server's — the
proxy is acting for the server.
Common real examples:
Nginx or a CDN edge sitting in front of your application, deciding
which backend instance handles a given request (this domain's load
balancer lesson, specifically).
A single reverse proxy in front of several internal services, so the
outside world only ever sees one address regardless of how the backend is
actually split up.
The confusion, resolved
The two terms get mixed up because the underlying mechanism — a middlebox
relaying traffic — is identical. The only real question that tells them
apart: whose identity is the proxy hiding from the other side? A forward
proxy hides the client from the server. A reverse proxy hides the server
(or servers) from the client. Once that one distinction is clear, "forward"
and "reverse" stop being arbitrary labels and start describing exactly what
each one does.
Why this matters day to day
Recognizing which kind of proxy you're dealing with tells you where to look
when something breaks. A request blocked by a corporate forward proxy is a
client-network problem, unrelated to the destination server. A request that
reaches the wrong backend, or gets a certificate error for a domain that
doesn't match, usually points at reverse-proxy/load-balancer configuration
instead — the same layer this domain's load balancer lesson already covered,
just now correctly named as one specific kind of proxy rather than a
separate concept.