Proxy and Reverse Proxy

Proxy and Reverse Proxy

We all have heard the word proxy or reverse proxy from somewhere or someone. It might sound a little strange at first but there's nothing really complicated about it. In this short article, I would be talking about what a proxy and a reverse proxy are and their use cases.

What is a proxy?

A proxy is a piece of software that helps make requests on behalf of a client. This is as simple as I can put it. You might be wondering how does a software makes requests for you or how do you make requests yourself? Well you see anytime you visit a particular website you are making a request to that website for it to serve you the content you get back on your screen.

To explain how a proxy works, let's say you wanted to go get something at the store and you were feeling too tired or just lazy to go to the store yourself to go get it and you send someone else to go it for you, that person is your proxy. The same thing goes for your online requests to different sites. If you don't want the client to know who is sending the requests, you can use a proxy to do that.

proxy.png

The normal flow of accessing a website would be from client to server, but when using a proxy it would be from client to proxy, from proxy to server. The client won't be aware of the connection from the proxy to the server, and the server won't also be aware of the connection from the client to the proxy.

This is one of the uses of a proxy, anonymity

Uses of a proxy

Here are some use cases for when to use proxies

  • Caching: This is one of the uses of a proxy. It helps cache results of any data you might have requested so that if you send for that data again instead of going to the site to fetch the data all over again it just sends back the data from its cache.

  • Anonymity: As discussed above a proxy can be used as a way to masks one's online identity.

  • Accessing Block website: You can use a proxy to access blocked sites. For instance, if a client blacklists your IP address for a reason, a workaround to access that site would be to use a proxy.

What is a reverse proxy?

Unlike a proxy, a reverse proxy is any software that receives an incoming request from a client. We know that proxies are used to send requests to clients but reverse proxies are used to receive incoming requests.

reverseproxy.jpeg

Uses of a reverse proxy

  • Load Balancing: A reverse proxy could be used as a load balancer to route all incoming traffic to other servers rather than them hitting the main server to increase network speed and reduce network traffic

  • Blocking sites: A reverse proxy can be set up so as to filter requests coming into a particular site, then the client requests can be filtered and the ones that are considered shady may be banned from having access to the main server.

  • Caching: Reverse proxies can be used to cache data too. Assuming a server had too much network traffic and the requests were routed to another server or a reverse proxy. If a client makes a request to get a file for example and the file has been served if the user makes such request again the reverse proxy will know to serve the same data to the client from its cached data.

Now some of you might be wondering what is the difference between a proxy and a VPN?

Both perform the same task of hiding your identity on the internet but a VPN encrypts for network traffic from your IP address to your client while your proxy doesn't encrypt your network and the data that passes through. VPN also protects you from your internet service provider (ISP) while proxies won't do that.

There are other uses of proxies and reverse proxies I just stated a few above. Thank you for reading this piece. If you have any questions do well to ask them in the comment section, Cheers!