What is a proxy server and what is the difference between reverse proxy and forward proxy server?

  • Proxy in english dictionary means a person who is given the power or authority to do something for someone else
  • Example: You nominating a person to be your proxy to caste a vote in your absence
  • In the world of computing, proxy does something similar. It acts on behalf of another device or resource.
  • It sits between a client and a server and performs an action on behalf of a client or a server.
  • When we make a request for a webpage , if we have a proxy server in between then instead of our client computer directly accessing the server where webpage is hosted, we make a request to the proxy server and it then calls the actual server to get the page we requested for and masks the identity of the actual client.
  • A proxy server is a computer that intercepts and manages traffic between two devices, networks, or protocols. 
  • In many organizations, when we make a request for a webpage then the request goes to a proxy server. It then verifies if the request is according to the organizations policy and if it is , then the proxy server makes a request on behalf of the client else it denies it.
  • By doing so, it can regulate traffic according to preset policies, convert and mask client IP addresses, enforce security protocols, and block unknown traffic.
  • This kind of proxy servers is called a forward proxy server. The direction of information exchange in this case is from client to a server.
  • Having a forward proxy server allows organization to have a single point of access and control.
  • While a forward proxy server is aimed to proxy the clients which makes request for a resource a reverse proxy does the exact opposite, it proxies the server which serves the request
  • For example, when we make a request for a web page, the reverse proxy server intercepts the request and forward it to the actual server which hosts the webpage and gets the response and serves it to the client by acting as if it had processed the request.
  • It hides the server which hosts the actual resource and becomes the proxy for servers
  • In most cases, reverse proxy servers also act as load balancers for the servers behind them.
  • Other common use cases or advantages of reverse proxy servers are
    • Providing security by monitoring and logging traffic
    • SSL termination at reverse proxy and eliminating the need to install certificates on each server
    • Serving static content on behalf of backend servers
    • URL Rewriting before they go on to the backend servers
    • IP Masking
  • Some of the common reverse proxy servers used are : NGINX, HAProxy,Varnish, Apache Tomcat.

If you want to protect clients in your internal network, put them behind a forward proxy and If your intention is to protect servers, put them behind a reverse proxy.


2 thoughts on “What is a proxy server and what is the difference between reverse proxy and forward proxy server?

Leave a Reply