Proxy vs Reverse Proxy

Written by infinity | Published 2023/02/09
Tech Story Tags: web-development | backend-developer | networking | software-development | engineering | computer-science | server | proxy-vs-reverse-proxy

TLDRA reverse proxy is a proxy server that sits behind a firewall on a private network and routes client requests to the proper backend server. A reverse proxy offers an additional degree of abstraction and control to ensure the smooth flow of network communication between clients and servers. A proxy server checks its local cache of previously visited sites when it receives a request for an Internet resource.via the TL;DR App

You must have heard the phrases "Proxy" and "Reverse Proxy" if you work in the developer community. Only a tiny percentage of these developers comprehend the underlying meaning of these keywords and the distinctions between them. Their lack of expertise leads to the misuse of terms. And as the saying goes:

Half Knowledge is worse than ignorance.

In this article, we will debunk these buzzwords and explain them so that any developer may use them confidently in their designs and discussions. We'll figure out when to utilise one over the other. Finally, we will have a bonus part to wrap off our conversation.

A Proxy, WHAT?

A quick Google search gives us the following meaning of the word Proxy - ā€œthe act or practice of serving as an authorised agent or substitute for anotherā€.

In the domain of Software Engineering, a Proxy refers to a computer or an application program that acts as an intermediary between a requesting client and responding server. The responding server receives all requests from the this Proxy while the requesting client sends all its requests to this same Proxy. In case of multiple clients, all clients send their request to the Proxy which are then forwarded to the responding server.

So, what is the purpose of a proxy? Why don't we just submit the request to the server? - Such queries may arise in the minds of interested readers. And these are some excellent questions to ask. Let us see some benefits of using Proxy servers.

Caching

Caching is only one of the many benefits of using a proxy server. The results of some of the numerous requests that the proxy server receives from clients can be stored and used to fill its cache. After that, this cache can be used to reply to other client requests. The server's CPU processing is reduced, and the client response time is enhanced.

Request Logging

Proxy server are also a good place for logging requests. It can log its interactions with the client and the server which can be helpful for the purpose of debugging.

How does Proxy Servers Work?

A proxy server checks its local cache of previously visited sites when it receives a request for an Internet resource (such a Web page). Without having to send the request to the Internet, it returns the page to the user if it is found. If the page is not in the cache, the proxy server requests it from the server on the Internet using one of its own IP addresses while serving as the user's client. The proxy server links the page that is returned to the initial request and sends it on to the user.

A REVERSE Proxy

Having understood what a Proxy is, let us talk about a reverse proxy.

A reverse proxy server is a sort of proxy server that often sits behind a firewall on a private network and routes client requests to the proper backend server. A reverse proxy offers an additional degree of abstraction and control to ensure the smooth flow of network communication between clients and servers.

It is simple to understand how the reverse proxy received its name by looking at the diagram. The diagram is simply the opposite of the proxy diagram!

So, what benefits does a Reverse Proxy provides? Here are some:

  • A reverse proxy can be used for properly balancing the client request load over multiple servers. In this way, no single server is overloaded and the service enjoys better uptime.
  • Rolling upgrades are when only a subset of client receives an update. This can also be achieved by the use of Reverse proxy where certain percentage of requests are forwarded to server running updates code.
  • Use of Reverse proxy simplifies the task of limiting access. Since there is only a single point of contact, a user barred from using Reverse proxy is effectively barred from using any server of the application.

BONUS: Load Balancer Vs Reverse Proxy

I have often seen people interchanging the usage of the term Load Balancer and Reverse Proxy. This is however not the case. While reverse proxy is a broader term, load balancing is one of the function of reverse proxy. Thus a reverse Proxy is a load balancer with many more functionalities to offer.


In conclusion, proxy and reverse proxy servers are essential components of the internet, providing security, privacy, and access control to web traffic. They act as gateways between user requests and web servers, allowing efficient and reliable communication between the two. Knowing how to set up and configure proxies and reverse proxies is an important part of system administration, and is essential for a secure and reliable web experience.

I hope you found the article interesting. I'd appreciate hearing your opinions and recommendations in the comments area. You can follow me on Twitter. Keep an eye out for future stories. Keep studying and improving till then.


Written by infinity | Tech Enthusiast!
Published by HackerNoon on 2023/02/09