A proxy, as its name implies, is an intermediate server between clients and origin servers, which plays an important role in the whole architecture of a web application. It may be confusing for beginners about the differences between the two types of it: forward proxy and reverse proxy.
Basically, the purposes and usages of these two are totally different.
Simply put, a forward proxy is a proxy for clients, a reverse proxy is a proxy for servers (so also known as a gateway).
Forward proxy
The forward proxy server, as a proxy for a client, will help a client request an origin server which a client may be hard to request directly.
For example, if one client is blocked by the origin server, this client can use a forward proxy server to request the content from the origin server and returns it to the client. In this case, the origin server doesn’t know who is the real client. Cause it only knows the forward proxy server sent requests.
On the other side, a client knows the origin server, and let the forward proxy help it request the origin server.
Therefore, a forward proxy server can help a client to bypass firewall restrictions.
In some cases, when you access a website but you don’t want the web server to know where you are. Adding one or even many layers of forward proxy servers will make your information securer.
Reverse proxy
A reverse proxy (or gateway), by contrast, appears to the client just like an ordinary web server. The client sends requests to the reverse proxy. Then the reverse proxy, as a proxy of origin servers, decides where to send those requests and returns the responses as if it were itself the origin server.
Therefore, a client doesn’t know where is the real origin server. In the client’s view, the reverse proxy server plays the role of the origin server and all requests should be sent to it.
Obviously, this mechanism can make the origin web servers securer, cause the reverse proxy hides the information of them.
In addition, lots of large websites have many web servers. A reverse proxy can play its role as a load balancer, it arranges which server handles which request. So a client only needs to know the address of the reverse proxy server and never needs to know how many web servers are behind it.
Conclusion
A proxy is a special server sitting between clients and origin servers.
If it’s a forward proxy server, a client knows where is the origin server. But the origin server doesn’t know which is the real client, it treats the forward proxy server as a client.
If it’s a reverse proxy server, a client doesn’t know which is the real origin server, it treats the reverse proxy server as the origin server.
In a word, a forward proxy is a proxy for clients and you need to configure the clients to use the forward proxy; a reverse proxy is a proxy for servers, you don’t need to configure anything on the client side for it.
Comments
Post a Comment
https://gengwg.blogspot.com/