Learn
What Is a Web Server? Web Server vs Application Server
A web server accepts HTTP connections, terminates TLS, serves static files from disk and forwards dynamic requests to ...
A reverse proxy is a server that sits in front of one or more origin servers, accepts client connections on their behalf, and forwards each request inward over a separate connection. Clients see one address. The origin sees only the proxy. Every request therefore crosses two independent connections, and the proxy controls routing, caching, TLS termination and header rewriting between them.
HTTP Semantics (RFC 9110, published 2022) formally calls a reverse proxy a "gateway": an intermediary that acts as the origin server for the client while forwarding requests to one or more servers behind it. A forward proxy is the mirror image. It acts for the client, and the server sees the proxy. As of 2026, CDNs, load balancers, API gateways and HTTP caches all work as reverse proxies.
A reverse proxy completes the client's connection and TLS handshake itself, decides what to do with the request, and opens or reuses a separate upstream connection only when it needs the origin. Because the two legs are independent, the proxy can serve from cache, retry, or reroute without the client ever seeing the backend topology.
The state that matters lives in three places: the client connection table, the upstream connection pool, and the cache index. Most production incidents involving a reverse proxy trace back to one of them, through exhausted upstream keepalives, a cache key that varies on the wrong header, or a health check that marks every pool member down at once.
The difference between a forward proxy and a reverse proxy is whose interests the proxy represents. A forward proxy is configured by or for the client and hides clients from servers. A reverse proxy is deployed by the site operator and hides servers from clients. The software can be identical. Only the deployment position and trust model differ.
| Dimension | Forward proxy | Reverse proxy |
|---|---|---|
| Operated by | Client side (corporate IT, ISP, user) | Server side (site operator, CDN) |
| Client awareness | Explicitly configured, or intercepted transparently | Invisible; the client believes it reached the origin |
| Destinations | Any host on the internet | A fixed set of upstreams it fronts |
| HTTPS handling | CONNECT tunnel, or TLS interception with a private CA trusted by clients | Terminates TLS with the site's own public certificate |
| Typical jobs | Egress filtering, auditing, shared caching for a user population | Load balancing, caching, TLS offload, origin shielding, rate limiting |
The decisive test is the certificate: a reverse proxy presents the site's own public certificate, while a forward proxy either tunnels the client's TLS untouched or needs a private CA installed on every client.
Strip away the product names and a load balancer, a cache and a CDN edge node perform the same act: terminate the client connection, then decide whether and where to forward. They differ only in which decision they optimize. A load balancer optimizes the choice of upstream, a cache optimizes avoiding the upstream entirely, and a CDN distributes that cache geographically and stacks it in tiers.
Stacking is where the reverse proxy model pays off, and the arithmetic is worth doing. Take 10,000 requests per second at the edge with a 95% hit ratio: 500 requests per second miss. Without a second tier, all 500 reach the origin. Put an origin shield (a mid-tier reverse proxy) between edge and origin, and if that shield hits 80% of edge misses, origin load drops to 100 requests per second, a 100x reduction from the edge rate. Request coalescing tightens it further. When a popular object expires on 50 edge nodes at once, an uncoalesced setup can send up to 50 simultaneous fills, while a shield with coalescing sends one and holds the other 49 until it returns.
The BlazingCDN Anycast CDN is a pull-caching reverse proxy of this shape, with origin shield and request coalescing included on every plan rather than added as a separate tier.
Reverse proxy vs. load balancer: Every Layer 7 load balancer is a reverse proxy, but not every reverse proxy balances load. A Layer 4 load balancer that forwards packets without terminating the connection (direct server return, IPVS) is not a reverse proxy in the HTTP sense, because the backend still owns the client's TCP session.
Reverse proxy vs. API gateway: An API gateway is a reverse proxy specialized for API traffic. It adds authentication, per-consumer quotas, request transformation and versioned routing. The forwarding core is the same, and most gateways are built on general-purpose proxies such as Envoy or nginx.
Reverse proxy vs. CDN: A CDN is a geographically distributed fleet of caching reverse proxies run as a service, usually arranged in edge and shield tiers. A single nginx in front of your app is a reverse proxy. Hundreds of them close to users, sharing cache hierarchy and routing, form a CDN.
In nginx, a working caching reverse proxy needs five decisions, each a single directive. First, an upstream block names the backend servers and enables keepalive so the proxy reuses connections instead of opening one per request. Second, a location block uses proxy_pass to point at that upstream. Third, proxy_set_header rewrites Host to the name the origin expects, and sets X-Forwarded-For from nginx's built-in proxy_add_x_forwarded_for variable so the origin can still log the real client address. Fourth, proxy_http_version must be set to 1.1 with the Connection header cleared, or upstream keepalive silently stays off. Fifth, proxy_cache_path and proxy_cache define the on-disk cache and its key.
The standardized alternative to X-Forwarded-For is the Forwarded header from RFC 7239. A typical value reads: for=203.0.113.7;proto=https;by=edge-fra-01. On the origin side, configure an explicit list of trusted proxy addresses and only read client identity from entries those proxies appended.
A reverse proxy is used to load balance traffic across backends, cache responses, terminate TLS, and shield origin servers from direct client traffic. Operators also use it for rate limiting, header normalization, compression and gradual rollouts, because every request passes through one controllable point before reaching the application, which makes policy changes possible without touching backend code.
Yes, a CDN is a distributed network of caching reverse proxies. Each edge node terminates the client connection, serves cached objects when it can, and forwards misses to a shield tier or the origin. The CDN presents the site's own certificate and hostname, so clients never connect to the origin directly unless the operator allows it.
A Layer 7 load balancer is a reverse proxy, but a Layer 4 load balancer usually is not. Layer 7 devices terminate HTTP and make routing decisions on request content. Layer 4 devices forward connections or packets based on addresses and ports, leaving the TCP session and TLS handshake to the backend server, so they cannot cache or rewrite headers.
A forward proxy acts for clients and hides them from servers, while a reverse proxy acts for servers and hides them from clients. In practice the forward proxy is configured on the client side for egress control, and the reverse proxy is deployed by the site operator in front of its origins with the site's public certificate.
Pull one hour of logs and compute the ratio of requests at your outermost reverse proxy to requests that reached the origin. If that ratio is below 20:1 for static content, inspect the cache key for stray Vary headers, cookies or query strings first. Then confirm two security basics: the origin firewall rejects anything not from your proxy ranges, and your application reads client identity only from entries added by trusted proxies. Finally, check the Age header on a few hot objects to confirm hits really come from cache.
If your heavy static traffic would benefit from an outer caching tier, the BlazingCDN feature list shows what is included on every plan, from origin shield and request coalescing to purge, signed URLs and Prometheus metrics.
Heavy traffic.
Light bill.
The CDN for video and large traffic
Learn
A web server accepts HTTP connections, terminates TLS, serves static files from disk and forwards dynamic requests to ...
Learn
What is a proxy server? A proxy server is an intermediary that accepts a client's request, applies policy, and then ...
Learn
A cache is a small, fast storage layer that keeps copies of data close to where they are read, so repeat requests skip ...
Learn
Raising a CDN's cache hit ratio from 95% to 99% cuts requests reaching the origin by 80%, from 50,000 to 10,000 per ...