Operations 5 min read

Understanding Nginx Forward and Reverse Proxy: Differences and Use Cases

This article explains the concepts of Nginx forward and reverse proxy, compares their roles, client and server perceptions, typical usage scenarios, and highlights why reverse proxy is a core Nginx feature while forward proxy is rarely used without third‑party modules.

Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Understanding Nginx Forward and Reverse Proxy: Differences and Use Cases

Hello everyone, I am mikechen.

Nginx is widely used in large‑scale websites and is often evaluated by major tech companies; below I detail the six major differences between Nginx forward proxy and reverse proxy.

Nginx Forward Proxy

A forward proxy works like an intermediary: the client entrusts the proxy to access the target server, and the target server only knows the proxy’s existence, not the real client.

The forward proxy sits between the client and the target server; the client knows the target server’s address, but the request is first sent to the forward proxy.

The forward proxy sends the request to the target server on behalf of the client and returns the response to the client.

Example: when you access Google from a corporate computer, you can configure a forward proxy so that the proxy server requests Google for you.

Nginx Reverse Proxy

A reverse proxy sits between the client and the backend servers; the client does not know the actual target server and only interacts with the reverse proxy.

The reverse proxy acts like a service desk: the client asks the desk for information, the desk forwards the request to the appropriate backend service, and the result is returned to the client, which only sees the desk.

Example: when you visit Baidu’s homepage, the request first reaches Baidu’s front‑end Nginx, which then forwards it to multiple backend service nodes before returning the response to you.

Differences Between Forward and Reverse Proxy

Comparison Dimension

Forward Proxy

Reverse Proxy

Proxy Target

Client

Server side

User

Client (e.g., bypassing censorship, anonymous browsing)

Server side (e.g., load balancing, static‑dynamic separation, caching, security)

Client Perception

Target server cannot see the client’s real IP

Client cannot see the backend server

Target Server Perception

Sees the proxy server’s IP

Sees the proxy server’s IP

Typical Scenarios

Scientific internet access, accessing blocked sites, anonymous browsing

Load balancing, static‑dynamic separation, cache acceleration, security protection, etc.

Common in Nginx?

Rare, requires third‑party modules

One of Nginx’s core use cases

Above is the comparison.

Finally, a special offer: a 300,000‑word Alibaba architect advanced topic collection, as well as the most complete large‑company Java interview questions and answers covering Java, multithreading, JVM, Spring, MySQL, Redis, middleware, and more.

For those who need the architecture topics and interview answers, add me on WeChat (note: "materials").

network architectureoperationsload balancingNginxReverse ProxyWeb Serverforward proxy
Mike Chen's Internet Architecture
Written by

Mike Chen's Internet Architecture

Over ten years of BAT architecture experience, shared generously!

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.