Nepedia
Back to Discover
Advanced Reader
💻

Reverse proxy

technology Maturity 11-13 Next article →

A reverse proxy, or surrogate server, is a specialized tool used in computer networks. It acts as an intermediary between a client, such as a web browser, and one or more web servers. To the user on the Internet, the reverse proxy appears to be the actual web server. In reality, it merely forwards requests to internal servers that are often hidden from public view.

Reverse proxy h2g2bob
Reverse proxy h2g2bob

Companies use these servers to increase scalability, performance, resilience, and security for their online services.

The mechanism of a reverse proxy involves a specific sequence of communication steps. When a client makes a request, it hits the reverse proxy first. The proxy inspects the incoming request by reading the URL or the HTTP headers. Based on this information, the proxy determines where the request should go. It might rewrite the URL to match a specific location within the internal network. The proxy then relays the request to the correct origin server. Once the origin server responds, the proxy delivers the resource back to the client.

Reverse proxy h2g2bob
Reverse proxy h2g2bob

There are several distinct ways a reverse proxy can manage network traffic. One method is load balancing, where the proxy distributes incoming requests across several different servers. This ensures that no single server becomes overwhelmed by too much work. Another method is caching, which involves storing copies of static or dynamic content. If the proxy has the requested content in its cache, it can serve it immediately. This process, known as web acceleration, reduces the load on the origin servers and the internal network.

Reverse proxy h2g2bob
Reverse proxy h2g2bob

Reverse proxies also provide advanced technical features to improve the user experience. They can perform data compression to make files smaller and faster to load. They can also handle TLS encryption, which is a method for securing communications. Instead of the web server performing this heavy task, the proxy handles it using TLS acceleration hardware. This is often called TLS termination. Additionally, a technique called "spoon-feeding" allows a proxy to serve a dynamically generated page bit by bit. This allows the generating program to release its server resources more quickly.

Reverse proxy h2g2bob
Reverse proxy h2g2bob

Security is a primary reason why organizations deploy these systems. A reverse proxy can hide the existence and characteristics of origin servers. This makes it harder for attackers to find the actual location of a website. It can also act as an application firewall to protect against web-based attacks. These include denial-of-service (DoS) or distributed denial-of-service (DDoS) attacks. By sitting in front of the servers, the proxy can filter out malicious traffic before it reaches the internal network.

Reverse proxy h2g2bob
Reverse proxy h2g2bob

Despite these benefits, using a reverse proxy introduces specific digital risks. Because the proxy must often decrypt and re-encrypt traffic to modify it, it must hold the TLS certificate and private key. This makes the proxy a highly valuable target for hackers. If a proxy is compromised, an attacker might gain access to the entire internal network. Furthermore, if a single proxy is used for many different domains, an outage could bring down every single one of them. This makes the proxy a single point of failure.

Reverse proxy h2g2bob
Reverse proxy h2g2bob

Understanding the difference between types of proxies is also essential. A forward proxy is used when a client on a private network wants to access the public Internet. In contrast, a reverse proxy protects the servers on the private network from the public Internet. While reverse proxies offer many advantages, they must be carefully configured. Organizations must provide daily updates to their attack signature databases. This helps prevent zero-day vulnerabilities from passing through the proxy unfiltered and reaching sensitive internal systems.

598 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (1)
File:Reverse proxy h2g2bob.svg
Reverse proxy h2g2bob.svg
More to explore

🔬 Go deeper

More advanced topics to explore

🪜 Step back

Simpler topics to build understanding

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.