Proxy v/s Reverse Proxy
The terms proxy and reverse proxy are commonly used in software engineering but can be a bit confusing.
The article will focus on the terms and will help you as well as me in getting a clear understanding.
Normal SetUp-
This is a normal setup, the client requests the server and the server returns the response and I will be building the Proxy and Reverse Proxy concepts upon this.
Proxy:
In such a setup, the client knows about the server as well as the proxy. That is, the client knows the address of the final server and the mediator as well. In this case, the mediator will act as a proxy.
Why do I need a proxy server?
There can be several reasons for it, some of them can be
Reverse-Proxy:
In proxy, the client knows about the server as well as the proxy, but in reverse proxy, the client knows about the mediator server but does not know about the final server.
In the above setup, the client knows the server details only, and then the server sends the request to the final servers, hence the configuration of the final servers (Server 1 and Server 2) is stored on the Server.
Recommended by LinkedIn
The most commonly used example of Reverse Proxy setup can be a Load Balancer.
In the above setup, the client knows only about the Load Balancer and never knows the final server data.
And, the load balancer stores the addresses of final servers(Server 1, Server 2, and Server 3)
Point to remember:
Summary
If your client is aware of the final server as well as the mediator then the mediator is serving as a proxy.
else if, your client is aware of the mediator only then the mediator is serving as a proxy.
In architecture design, it's not like we use Proxy or Reverse Proxy, it's more like Proxy and Reverse Proxy, majority of architecture uses both to serve their requirements.
This is just the tip of the iceberg do read more about it to get a deeper understanding.