Reverse Proxies Explained: How They Work & Why They Matter

Nathan Reynolds

Proxy Fundamentals

Most people meet proxies from the client side: you route your traffic through a residential proxy and the website sees the proxy's IP instead of yours. A reverse proxy inverts that relationship. Instead of protecting the person making the request, it sits in front of the servers answering requests. Clients talk to the reverse proxy; the reverse proxy talks to your backend. Nobody on the public internet touches your origin servers directly.

If you've ever configured Nginx, put a site behind Cloudflare, or run a Kubernetes ingress, you've already used a reverse proxy — you just may not have called it that. This guide covers what it actually does, where it helps, a working config you can adapt, and the honest limits of what it can and can't do.

Forward proxy vs. reverse proxy: who gets protected

The mechanics are similar; the intent is opposite. Both are intermediaries that terminate one connection and open another. The difference is which side of the conversation they represent.

Aspect

Forward proxy

Reverse proxy

Acts on behalf of

The client

The server(s)

Configured by

User or client app

Server / infrastructure operator

Hides

The client's IP

The origin server's IP

Typical goals

Privacy, geo-access, data collection

Caching, load balancing, TLS, filtering

Client aware of it?

Usually yes

Usually no — looks like the real site

If you want the full picture from the client's angle, we've written that up separately in Forward Proxies Explained. For the broader category, see our overview of proxy servers.

What a reverse proxy actually does

At the network level, a reverse proxy terminates the incoming TCP/TLS connection from the client, decides what to do with the request, then opens a fresh connection to one of your backend servers. Because it's the single entry point, it becomes a natural place to enforce policy, cache responses, and spread load. Here are the five jobs it does most often.

1. Caching frequently requested content

A reverse proxy can store copies of responses — static assets, API results, or whole pages — and serve them without bothering the backend. That cuts latency and takes pressure off your application servers.

Say your origin runs in North America and a chunk of your audience is in Asia. Rather than every visitor round-tripping across the Pacific, an edge node caches the response after the first request and serves subsequent visitors from close by. The origin gets hit once; everyone else gets a fast local copy. This is the core idea behind a CDN, and it's why cache hit ratio is one of the first metrics you tune.

We go deeper on caching strategy in our guide to enhancing web performance with reverse proxies.

2. Load balancing across backends

Because it's the front door for all traffic, a reverse proxy can distribute incoming requests across a pool of backend servers so no single machine becomes a bottleneck. During a traffic spike, that even distribution is what keeps the site responsive instead of falling over.

Illustration showing reverse proxy distributing traffic for load balancing

It also doubles as a failover layer: with health checks configured, if one backend stops responding, the proxy quietly routes around it to the healthy servers. A quick note on terminology — a reverse proxy that spreads traffic is doing load balancing, but a dedicated load balancer may use more advanced algorithms (least-connections, weighted, latency-aware) than a basic round-robin proxy config. Modern proxies like Nginx and HAProxy include serious load-balancing features, so in practice the line is blurry.

3. Hiding the origin server's IP

Because the proxy terminates the client connection and opens its own to the backend, the backend only ever sees the proxy's IP. Your origin address stays off the public record. That makes it much harder for someone to target your servers directly with a volumetric DDoS attack — they'd be pointing traffic at the proxy or CDN layer, which is built to absorb it, not at your application box.

4. Filtering traffic before it reaches your app

Sitting upstream of your servers, a reverse proxy can inspect and drop unwanted requests before they touch application code. This is where you commonly bolt on a Web Application Firewall (WAF) to catch SQL injection, cross-site scripting, and abusive request patterns, plus rate limiting to throttle a single noisy client. It's not a full security suite, but doing this at the edge means malicious traffic never consumes backend resources.

5. Centralized TLS termination

Encrypting and decrypting every TLS connection is CPU work. Handling it on each backend, under load, wastes cycles you'd rather spend serving content. A reverse proxy can terminate TLS in one place — you manage certificates, ciphers, and HTTP/2 or HTTP/3 there — and forward plain (or re-encrypted) traffic to backends over your trusted internal network. One place to rotate certs, one place to enforce your TLS policy.

A minimal Nginx reverse proxy config

Here's a stripped-down example that terminates TLS, caches responses, and load-balances across two backends. It's a starting point, not a production template — but every directive here maps to a benefit above.

upstream app_backend {
    server 10.0.0.11:8080;
    server 10.0.0.12:8080;
    # round-robin by default; add "least_conn;" to balance by active connections
}

proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=app_cache:10m max_size=1g inactive=60m;

server {
    listen 443 ssl;
    server_name example.com;

    ssl_certificate     /etc/ssl/certs/example.com.pem;
    ssl_certificate_key /etc/ssl/private/example.com.key;

    location / {
        proxy_pass http://app_backend;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        proxy_cache app_cache;
        proxy_cache_valid 200 302 10m;
        proxy_cache_valid 404 1m

Two details worth calling out: the upstream block is your load-balancing pool, and the X-Forwarded-For header is how the backend still learns the real client IP even though it only sees a connection from the proxy. Forget that header and every log entry looks like it came from your proxy — a classic gotcha. Full directive reference lives in the Nginx documentation.

Build it yourself, or use a managed layer

You have two realistic paths, and the right one depends on how much control you want versus how much you want to operate.

Self-hosted. Run Nginx, HAProxy, or Apache on your own infrastructure. Maximum control over routing, caching rules, and TLS policy — you tune everything. The trade-off is that you own uptime, patching, scaling, and the on-call pager when it breaks.

Managed / CDN. Use a CDN or managed edge service that includes reverse-proxy features. Setup and scaling are handled for you, and you inherit the provider's DDoS capacity. You give up some fine-grained control in exchange for far less operational overhead.

Diagram showing business advantages of using reverse proxies

Where this fits alongside outbound proxies

A reverse proxy protects and accelerates infrastructure you own. It's the wrong tool for outbound work like collecting public data, running geo-distributed QA, or verifying how your ads render in different regions. That's a job for forward proxies — Evomi's ethically sourced residential proxies (from $0.49/GB), datacenter, mobile, and static ISP options give you clean egress IPs, while our managed Scraping Browser handles headless Chromium for you. If you're weighing which egress type suits your project, our proxy fundamentals guide breaks down the options. In short: reverse proxy for the server side, forward proxy for the client side — and many stacks use both.

What a reverse proxy won't do

Two honest caveats, because the marketing around this tends to oversell it.

It's not a complete security solution. A reverse proxy shrinks your attack surface and adds a strong layer of defense, but it doesn't make you immune. It's one layer in a defense-in-depth approach — you still need patched software, sane auth, and monitoring behind it.

It's not automatically a dedicated load balancer. Basic request distribution comes free, but true load balancing with health-aware scheduling, connection draining, and weighting is its own discipline. Many reverse proxies do it well; a default config with round-robin does not.

Bottom line

If your site or application serves real traffic, a reverse proxy is close to standard practice: it caches, balances load, hides your origin, filters junk requests, and centralizes TLS. Whether you run Nginx yourself or lean on a managed edge, the payoff is a faster, more resilient front door. Just remember which direction you're pointing — reverse proxies guard what you host; forward proxies handle what you reach out to.

Most people meet proxies from the client side: you route your traffic through a residential proxy and the website sees the proxy's IP instead of yours. A reverse proxy inverts that relationship. Instead of protecting the person making the request, it sits in front of the servers answering requests. Clients talk to the reverse proxy; the reverse proxy talks to your backend. Nobody on the public internet touches your origin servers directly.

If you've ever configured Nginx, put a site behind Cloudflare, or run a Kubernetes ingress, you've already used a reverse proxy — you just may not have called it that. This guide covers what it actually does, where it helps, a working config you can adapt, and the honest limits of what it can and can't do.

Forward proxy vs. reverse proxy: who gets protected

The mechanics are similar; the intent is opposite. Both are intermediaries that terminate one connection and open another. The difference is which side of the conversation they represent.

Aspect

Forward proxy

Reverse proxy

Acts on behalf of

The client

The server(s)

Configured by

User or client app

Server / infrastructure operator

Hides

The client's IP

The origin server's IP

Typical goals

Privacy, geo-access, data collection

Caching, load balancing, TLS, filtering

Client aware of it?

Usually yes

Usually no — looks like the real site

If you want the full picture from the client's angle, we've written that up separately in Forward Proxies Explained. For the broader category, see our overview of proxy servers.

What a reverse proxy actually does

At the network level, a reverse proxy terminates the incoming TCP/TLS connection from the client, decides what to do with the request, then opens a fresh connection to one of your backend servers. Because it's the single entry point, it becomes a natural place to enforce policy, cache responses, and spread load. Here are the five jobs it does most often.

1. Caching frequently requested content

A reverse proxy can store copies of responses — static assets, API results, or whole pages — and serve them without bothering the backend. That cuts latency and takes pressure off your application servers.

Say your origin runs in North America and a chunk of your audience is in Asia. Rather than every visitor round-tripping across the Pacific, an edge node caches the response after the first request and serves subsequent visitors from close by. The origin gets hit once; everyone else gets a fast local copy. This is the core idea behind a CDN, and it's why cache hit ratio is one of the first metrics you tune.

We go deeper on caching strategy in our guide to enhancing web performance with reverse proxies.

2. Load balancing across backends

Because it's the front door for all traffic, a reverse proxy can distribute incoming requests across a pool of backend servers so no single machine becomes a bottleneck. During a traffic spike, that even distribution is what keeps the site responsive instead of falling over.

Illustration showing reverse proxy distributing traffic for load balancing

It also doubles as a failover layer: with health checks configured, if one backend stops responding, the proxy quietly routes around it to the healthy servers. A quick note on terminology — a reverse proxy that spreads traffic is doing load balancing, but a dedicated load balancer may use more advanced algorithms (least-connections, weighted, latency-aware) than a basic round-robin proxy config. Modern proxies like Nginx and HAProxy include serious load-balancing features, so in practice the line is blurry.

3. Hiding the origin server's IP

Because the proxy terminates the client connection and opens its own to the backend, the backend only ever sees the proxy's IP. Your origin address stays off the public record. That makes it much harder for someone to target your servers directly with a volumetric DDoS attack — they'd be pointing traffic at the proxy or CDN layer, which is built to absorb it, not at your application box.

4. Filtering traffic before it reaches your app

Sitting upstream of your servers, a reverse proxy can inspect and drop unwanted requests before they touch application code. This is where you commonly bolt on a Web Application Firewall (WAF) to catch SQL injection, cross-site scripting, and abusive request patterns, plus rate limiting to throttle a single noisy client. It's not a full security suite, but doing this at the edge means malicious traffic never consumes backend resources.

5. Centralized TLS termination

Encrypting and decrypting every TLS connection is CPU work. Handling it on each backend, under load, wastes cycles you'd rather spend serving content. A reverse proxy can terminate TLS in one place — you manage certificates, ciphers, and HTTP/2 or HTTP/3 there — and forward plain (or re-encrypted) traffic to backends over your trusted internal network. One place to rotate certs, one place to enforce your TLS policy.

A minimal Nginx reverse proxy config

Here's a stripped-down example that terminates TLS, caches responses, and load-balances across two backends. It's a starting point, not a production template — but every directive here maps to a benefit above.

upstream app_backend {
    server 10.0.0.11:8080;
    server 10.0.0.12:8080;
    # round-robin by default; add "least_conn;" to balance by active connections
}

proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=app_cache:10m max_size=1g inactive=60m;

server {
    listen 443 ssl;
    server_name example.com;

    ssl_certificate     /etc/ssl/certs/example.com.pem;
    ssl_certificate_key /etc/ssl/private/example.com.key;

    location / {
        proxy_pass http://app_backend;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        proxy_cache app_cache;
        proxy_cache_valid 200 302 10m;
        proxy_cache_valid 404 1m

Two details worth calling out: the upstream block is your load-balancing pool, and the X-Forwarded-For header is how the backend still learns the real client IP even though it only sees a connection from the proxy. Forget that header and every log entry looks like it came from your proxy — a classic gotcha. Full directive reference lives in the Nginx documentation.

Build it yourself, or use a managed layer

You have two realistic paths, and the right one depends on how much control you want versus how much you want to operate.

Self-hosted. Run Nginx, HAProxy, or Apache on your own infrastructure. Maximum control over routing, caching rules, and TLS policy — you tune everything. The trade-off is that you own uptime, patching, scaling, and the on-call pager when it breaks.

Managed / CDN. Use a CDN or managed edge service that includes reverse-proxy features. Setup and scaling are handled for you, and you inherit the provider's DDoS capacity. You give up some fine-grained control in exchange for far less operational overhead.

Diagram showing business advantages of using reverse proxies

Where this fits alongside outbound proxies

A reverse proxy protects and accelerates infrastructure you own. It's the wrong tool for outbound work like collecting public data, running geo-distributed QA, or verifying how your ads render in different regions. That's a job for forward proxies — Evomi's ethically sourced residential proxies (from $0.49/GB), datacenter, mobile, and static ISP options give you clean egress IPs, while our managed Scraping Browser handles headless Chromium for you. If you're weighing which egress type suits your project, our proxy fundamentals guide breaks down the options. In short: reverse proxy for the server side, forward proxy for the client side — and many stacks use both.

What a reverse proxy won't do

Two honest caveats, because the marketing around this tends to oversell it.

It's not a complete security solution. A reverse proxy shrinks your attack surface and adds a strong layer of defense, but it doesn't make you immune. It's one layer in a defense-in-depth approach — you still need patched software, sane auth, and monitoring behind it.

It's not automatically a dedicated load balancer. Basic request distribution comes free, but true load balancing with health-aware scheduling, connection draining, and weighting is its own discipline. Many reverse proxies do it well; a default config with round-robin does not.

Bottom line

If your site or application serves real traffic, a reverse proxy is close to standard practice: it caches, balances load, hides your origin, filters junk requests, and centralizes TLS. Whether you run Nginx yourself or lean on a managed edge, the payoff is a faster, more resilient front door. Just remember which direction you're pointing — reverse proxies guard what you host; forward proxies handle what you reach out to.

Author

Nathan Reynolds

Web Scraping & Automation Specialist

About Author

Nathan specializes in web scraping techniques, automation tools, and data-driven decision-making. He helps businesses extract valuable insights from the web using ethical and efficient scraping methods powered by advanced proxies. His expertise covers overcoming anti-bot mechanisms, optimizing proxy rotation, and ensuring compliance with data privacy regulations.

Like this article? Share it.
You asked, we answer - Users questions:
What is the difference between a proxy and a reverse proxy?+
Is a reverse proxy the same as a load balancer?+
Does a reverse proxy improve security?+
Can I run a reverse proxy myself, or should I use a service?+
Do I need proxies for tasks like web scraping or geo-testing?+
How does the backend see the real client IP behind a reverse proxy?+

In This Article