What is a reverse proxy? How it protects and speeds up your servers
A reverse proxy is an intermediary network component that sits in front of the servers of a public online service: it accepts requests from clients on behalf of those servers and returns the servers’ responses to the user. Because every request passes through this single point, a reverse proxy is able to filter, cache, distribute and encrypt traffic before it reaches the systems behind it.
Key Takeaways
A reverse proxy stands in front of your web and application servers, takes in every client request and decides how that request is answered – which makes it a central point for security, performance and availability.
- How it works: the proxy receives the request, checks it, answers it from its cache or forwards it to a backend server and passes the response back to the client.
- Difference from a forward proxy: a forward proxy acts for clients toward the internet, a reverse proxy acts for servers toward the clients.
- Load balancing: it spreads requests across several backend servers and routes around servers that have failed.
- Caching and compression: it answers repeat requests for static content itself and compresses responses, which takes load off the backend.
- Security: rate limiting, a web application firewall, IP allowlisting and hidden backend addresses keep attacks away from your servers.
- Encryption: the proxy can terminate TLS centrally, so certificates are managed in one place instead of on every server.
How does a reverse proxy work?
Essentially, a proxy server functions as a communication intermediary in the network: it receives requests and passes them along to a target server on behalf of the client. A reverse proxy is positioned between clients (e.g., web browsers) and backend servers (e.g., web servers, database servers or applications). It becomes active as soon as a client request arrives and decides whether the request is answered at all and which of your internal server components should handle it. The process follows these four basic steps:
-
Receiving the client request: The reverse proxy accepts HTTP, HTTPS or other requests like FTP or WebSocket.
-
Analyzing the request: The proxy examines whether the request is valid, whether it presents any security risks and if there is a cached version available.
-
Forwarding to the appropriate server: If the request cannot be answered from the cache, the reverse proxy sends the request to one of your internal servers.
-
Response to the client: The reverse proxy receives the response from your backend server, processes it further if necessary (e.g., re-encrypting it) and sends it back to the requesting client.
Because the client only ever addresses the reverse proxy, the backend servers never appear directly on the internet. How many of them there are, which addresses they use and which software they run stays invisible from the outside – and you can rebuild the setup behind the proxy without changing the URL that your users call.

Reverse proxies are usually secured by a firewall and installed in a private network or an upstream demilitarized zone (DMZ).
What is the difference compared to forward proxies?
While reverse proxies, as mentioned earlier, are placed between clients and backend servers, forward proxies are positioned between clients and the internet. A forward proxy channels all client requests and forwards them with its own sender address to the target servers on the internet. Server responses also reach the proxy first before being distributed to the respective client devices. These remain anonymous – unless it is a transparent proxy. While a forward proxy protects the clients in your internal network from external threats, a reverse proxy secures your servers in a public network and optimizes their accessibility.
While reverse proxies offer clear advantages for your server structures through features like load balancing and various security functions, the strengths of forward proxies lie in client protection.
| Forward proxy | Reverse proxy | |
|---|---|---|
| Acts on behalf of | the clients | the servers |
| Position in the network | between the clients and the internet | between the internet and the backend servers |
| Hides | the clients from the target server | the backend servers from the clients |
| Typically operated by | a company for its own network | the operator of the online service |
| Main purpose | controlling and anonymizing outbound access | security, availability and speed of the service |
If you are not sure which of the two you need, the decisive question is whose side you are on: a forward proxy is set up by whoever owns the clients, a reverse proxy by whoever owns the servers.

Forward proxies are often used to control internet access in corporate networks. Other areas of use include anonymization in VPN services and bypassing geo-blocks.
Areas of application for reverse proxies
Bundling client requests allows a reverse proxy to exercise a high degree of control over incoming traffic. Among other things, this makes it possible to provide multiple servers under the same URL, evenly distribute requests across different servers and speed up data retrieval through caching. Below are the key areas of application for a reverse proxy server.
- Cost-effective vCPUs and powerful dedicated cores
- Flexibility with no minimum contract
- 24/7 expert support included
Load balancing
A reverse proxy placed in front allows a URL to be linked with various servers in your private network. This distributes incoming requests across multiple servers. Such load balancing prevents overload of individual systems and compensates during failures. If a server is unreachable due to hardware or software errors, the proxy’s load balancing module redistributes incoming requests to remaining servers. This ensures the availability of your server services even during failures.
Which server receives a given request is decided by the distribution method you configure – in rotation (round robin), by the number of open connections or weighted so that stronger machines take a larger share. To notice a failure at all, most reverse proxies query the backend servers at regular intervals with health checks and take a server out of the rotation as soon as it stops answering correctly.
Caching
To speed up your server services, reverse proxies can offer a feature that allows frequently requested content to be cached. This caching enables the proxy server to answer repetitive requests either partially or completely on its own. Static content like images or CSS stylesheets is stored in the proxy’s cache. As a result, little to no data needs to be retrieved from your backend server, which noticeably shortens the response time for web services. However, because rapidly changing content may not always ensure the proxy’s cache has the current version, there’s a risk of delivering outdated information to requesting clients.
How long a stored response may be reused is controlled by the cache headers your backend sends, above all Cache-Control and Expires. For content that changes frequently, keep these intervals short or exclude those paths from caching entirely.
Protection and security measures
A reverse proxy acts as a kind of shield for your backend servers and can offer various security functions in this role:
- DDoS protection: Reverse proxies can detect and block suspicious or unusually high traffic during DDoS attacks before it reaches your backend servers.
- Rate limiting: You can cap how many requests a single IP address or session is allowed to make within a given period. This blunts automated attempts to guess login credentials and keeps aggressive crawlers from using up backend capacity.
- Web Application Firewall (WAF): Many reverse proxies include a WAF that can filter malicious requests like SQL injections or Cross-Site Scripting (XSS).
- IP allowlisting and blocklisting: The reverse proxy can block certain IP addresses or allow connections only from specific networks if needed. The older terms whitelisting and blacklisting describe the same mechanism.
- Hiding of backend servers: The reverse proxy prevents the internal IP addresses of your backend servers from being publicly visible, making attacks more difficult.
- Central logging: Because all traffic passes through one point, you get a single place in which requests, response codes and blocked attempts are recorded – which makes unusual patterns easier to spot than in the logs of several separate machines.
A reverse proxy does not replace the security of the systems behind it. In the US, the guidance that CISA publishes on denial-of-service attacks treats upstream filtering of this kind as one building block among several, alongside hardening the application itself and preparing a response plan before an incident occurs.
Encryption and TLS termination
To reduce the load on your backend servers, reverse proxy servers can also be used for encryption. In this case, it decrypts the client’s SSL/TLS request (e.g., an HTTPS connection), forwards the decrypted data to your backend servers and sends the corresponding response back to the client encrypted again. This arrangement is known as TLS termination or SSL offloading. The internal communication can occur either encrypted or unencrypted.
Terminating the encryption centrally has a practical advantage: you install, renew and revoke certificates in one place instead of on every backend server. Be aware, though, that the connection between the proxy and the backend is readable unless you encrypt that leg separately – which is why this segment belongs in a protected network, as described above.
Anonymization and geo-load balancing
A reverse proxy also changes what your backend servers get to see. Because the connection ends at the proxy, the backend receives requests carrying the proxy’s IP address instead of the client’s. This helps protect your visitors’ privacy, as the actual IP addresses won’t be visible in the logs. In most setups, however, the client address is passed on in a header such as X-Forwarded-For, because applications need it for rate limiting, geolocation and handling abuse – so decide deliberately whether you want that header to be set.
Geo-load balancing works the other way around: here the proxy evaluates the geographic location derived from the client’s IP address in order to route the request to the nearest server. Anonymization and geo-routing therefore pull in opposite directions, and you need to decide which of the two matters more for your service.
Compression
With the right software, a reverse proxy can compress the data it sends out before it reaches the client, which reduces transfer volume on slow connections in particular. A popular program for compressing websites is gzip, often used in combination with the web servers Apache or NGINX. Brotli is now widely used alongside it and generally produces smaller files for text content such as HTML, CSS and JavaScript.
Compression costs computing time, so it is worth restricting it to file types that actually benefit. Images and videos are already compressed in their own formats and gain nothing from a second pass.
Which software can act as a reverse proxy?
Most common web servers can be operated as a reverse proxy, and which one you choose usually depends on what is already running in your infrastructure:
- NGINX is widely used as a reverse proxy and load balancer and is configured through its own directives.
- Apache HTTP Server takes on the role through its proxy modules, which is the obvious route if Apache is already serving your application.
- HAProxy specializes in load balancing and connection handling rather than delivering files itself.
- Traefik and Envoy are frequently chosen for containerized environments, where backends appear and disappear and the configuration has to follow automatically.
What matters for the decision is less raw throughput than how well the configuration fits your deployment process – a proxy whose rules nobody dares to touch is a risk of its own.
In separate articles, we show you step by step how to set up an NGINX reverse proxy or an Apache reverse proxy.


