Learn through the super-clean Baeldung Pro experience:
>> Membership and Baeldung Pro.
No ads, dark-mode and 6 months free of IntelliJ Idea Ultimate to start with.
Last updated: March 18, 2024
Many businesses use a proxy server to route and secure traffic between the networks. The proxy server acts as an intermediatory between the clients and servers. There are two types of proxy servers – Forward Proxy and Reverse Proxy.
In this tutorial, we’ll discuss what’s a forward proxy, what’s a reverser proxy, their use cases, and how they differ from each other.
It’s often referred to as just a proxy server. This type of server resides in front of the clients and acts as a mediator between the clients and the servers. The below diagram depicts the same:
The forward proxy ensures that the client request always goes through the proxy server first and then reaches the destination. One of the main purposes of the forward proxy is to process outgoing requests.
Below is the list of some of the popular forward proxy servers:
The reverse proxy is part of the server-side infrastructure and resides in front of the web servers. It acts as an entry point for all incoming requests. The below diagram shows the same:
The reverse proxy ensures that the client doesn’t communicate directly with the web servers. One of the main purposes of the reverse proxy is to load balance the incoming requests.
Below is the list of some of the popular reverse proxy servers:
Let’s discuss the differences between the forward and reverse proxy serves:
| Forward Proxy Server | Reverse Proxy Server |
|---|---|
| Handles outgoing requests | Handles incoming requests |
| Resides in front of the clients | Resides in front of the web servers |
| Provides client anonymity | Provides server anonymity |
| Can be part of the client-side infrastructure | It’s a part of the server-side infrastructure |
| Examples: PHP-Proxy, CGI-Proxy, Squid | Examples: NGINX, HAProxy, Istio, Linkerd |
In this tutorial, we briefly discussed the forward and reverse proxy servers. Then we discussed their use cases and examples.
Finally, we discussed how they differ in their functionality.