Skip to content

Forward Proxy vs Reverse Proxy

Forward Proxy

Sits between client and internet. Client talks to proxy, proxy talks to internet on behalf of client.

Client --- Forward Proxy --- Internet
           (hides client)

Server sees proxy's IP, not client's IP — client identity is hidden.

Reverse Proxy

Sits between internet and servers. Client talks to proxy, proxy talks to backend servers on behalf of servers.

Client --- Reverse Proxy --- Backend Servers
           (hides servers)

Client sees proxy's IP, not server's IP — server identity is hidden.

Side by Side

Forward Proxy:
[Client] --- [Proxy] --- [Internet/Server]
 known      hides client    sees proxy

Reverse Proxy:
[Client] --- [Proxy] --- [Backend Servers]
 sees proxy   hides servers   known

Forward Proxy — Use Cases

Use CaseHow
Bypass geo-restrictionsClient routes through proxy in another country
Corporate filteringCompany proxy blocks certain sites
AnonymityServer never knows real client IP
CachingProxy caches responses for multiple clients

Examples: VPN, Squid proxy, browser proxy settings

Reverse Proxy — Use Cases

Use CaseHow
Load balancingDistribute traffic across servers
TLS terminationHandle HTTPS, pass HTTP to backend
CachingCache responses, reduce backend load
DDoS protectionHide and protect origin servers
Rate limitingBlock abusive clients at proxy level
API GatewayRoute /api/users → user service, /api/orders → order service

Examples: Nginx, Cloudflare, AWS ALB, Traefik

Key Difference — Who Is Being Hidden?

Forward ProxyReverse Proxy
HidesClientServer
ProtectsClient's identityServer's identity/infrastructure
Who configures itClient sideServer side
Client knows about itYesNo

Nginx as Reverse Proxy (Common Interview Example)

Client --HTTPS--> Nginx (reverse proxy)
                     ├── Node.js app :3000
                     ├── Node.js app :3001
                     └── Node.js app :3002

Nginx handles TLS, load balancing, caching — backend just runs plain HTTP.