Updated: Dec 9, 2022
Let's take an example. Let's say you are working in your office, you get bored and decide to open twitter on your company laptop. You decide to check out the Twitter profile of The Geeky Minds. You open the website URL: https://twitter.com/thegeekyminds and find that you are unable to open the page on your company laptop. But the URL exists, you have opened it before! All other websites also open perfectly fine, so there are no internet issues. How is it possible that only one particular website does not open? The answer is - This is happening because your company laptop is connected to the internet which is regulated by a proxy.
Proxy servers are commonly used by business corporates and government entities to route and secure traffic between networks. However, there is often confusion about how this differs from a reverse proxy.
Let's dive right in -
What is a Proxy?
A proxy can be defined as software that makes requests to the server on behalf of the clients. In simple words, the proxy sits between the clients and the servers. Any request from the user first goes through the proxy and then reaches the server. This is also known as "forward proxy".
The system or router on which this software sits is known as a Proxy Server.
Since a proxy server sits between a user and the web server, it plays a crucial role in preventing cyber attacks. A proxy server is also useful when setting up private networks. Just like normal computers connected to the internet have an IP Address, these proxy servers also have their own IP Address.
How does a proxy work?
As mentioned, proxies are an intermediary that sits between a user's browser and a website, routing the requests through their own machine. It can be thought of as if proxies act as a filter between users and the server. Any request from the user first goes through the proxy and then reaches the server.
They also provide a level of anonymity, often required by people who do not want their browsing history to be tracked by their ISPs. Proxies are also used to allow users to access sites they would not normally be able to reach.
Use cases of proxy servers
Block unwanted websites and improve network security
This is a very common use case when ISPs want to block certain websites or when the government wants to block access to certain websites. Companies also use proxies when they want to restrict certain websites from being accessed by their employees, maybe to prevent unwanted leakage of company information.
ISPs (Internet Service Providers) also use caching when they want to serve requests faster. For example, if some other person had already made a request to a certain server, the ISPs can cache this response so that it can return the response faster the next time someone makes the same request.
Proxy servers also add a layer of anonymity between the server and the user, where the server won't know. which user made the request. (However, the proxy server would know this information)
Companies use proxy servers to keep a track of which websites were visited by which employees.
Now that you know all about proxies. What is a reverse proxy? A reverse proxy is basically the reverse of a normal proxy. Now you would ask "Gourav how can we reverse the above arrangement?". Let me tell you -
What is a Reverse Proxy?
In a proxy setup, the server does not know the user. In a reverse proxy, the user does not know the server. Makes sense? Let me give you an example -
For example, you as a user and you want to go to google.com.
You would argue that google.com is the final server and you know about it.
google.com isn't the final destination. google.com is the reverse proxy to which you send requests. There are internally many servers in google. This google.com server will communicate with any one of the servers and make the request on your behalf and return the response of that server to you.
A reverse proxy can be defined as a server that accepts the request from clients, forward it to one of the many servers available for processing the request, and responds back to the user.
Reverse proxy manages all the incoming requests and protects the identity and address of the instances actually executing the requests.
So why is a reverse proxy used? Let's see
Use cases of a reverse proxy
Yes caching again! The reverse proxy server can store the response of a request in the cache and if a user makes the same request again, it can read from the cache and return the response.
The reverse proxy can act as a load balancer where it can direct the incoming requests to the server which is available to take requests
Can be used in deployment cycles. The reverse proxy can direct maybe 10% of the incoming requests to a new version of a feature to test it. Big companies like Instagram, youtube do it all the time.
Reverse proxies are offered by many vendors such as VMware, F5 Networks, Citrix Systems, A10 Networks, Radware, and Public Cloud platforms such as Amazon Web Services and Microsoft Azure.
Types of Proxy Servers and their uses
There are different types of proxies. Let's look at them one by one.
The proxy which we discussed above is also known as a forward proxy. As discussed, a forward proxy is a type of proxy server that sits in front of clients and is used to get data to groups of users within an internal network.
A transparent proxy is a proxy server that can be used to connect to the internet without any type of restriction. The main goal of a transparent proxy is to provide an experience identical to what the user would have if they were using their home computer.
The transparent proxy service is perfect for companies who want to route their traffic over a shared IP yet do not want their employees to be aware. But the transparent proxy comes with the possibility of security threats like Denial of Service attacks etc.
An anonymous proxy helps make your internet activity "untraceable." It works by accessing the internet on your behalf while hiding your identity and computer information.
Anonymity is key when using the Anonymous proxy. While Anonymous proxies provide excellent protection when it comes to your identity, they also have some drawbacks. Always stay up to date on the latest security risks and research potential consequences before using a new proxy! Many people see the use of Anonymous proxies as sneaky, and some even face harassment or discrimination as a result. However, it provides us with much-needed anonymity.
High Anonymity Proxy
A high anonymity proxy is a proxy that will keep you protected by preventing your details from being recorded. It also bypasses online content filters by masking user data.
This type of proxy server is best suited for users for whom anonymity is an absolute necessity, such as employees who do not want their activity to be traced back to their organization. This server is also great for those looking for complete anonymity, such as employees who want to prevent the organization they work for from finding out what they have been browsing. While this provides good anonymity, there have been cases, mostly for the free ones which were actually decoys set up to lure users and get their personal data or information.
TOR Onion Proxy
It provides anonymity through TOR nodes. It prevents others from tracking what you're doing on the Internet by sending your requests through various worldwide networks and encrypting them. This way it is difficult to track your address and isolate any suspicious activity.
It uses the Onion routing protocol - which passes information through many layers and encrypts it in each layer, making the message becomes increasingly difficult to understand and decode. Until finally, it reaches the rightful recipient where each layer is decoded. This is free and open source.
Distorting proxies constitute a mischievous mixture of proxy and alias: they constantly disguise themselves as coming from a certain IP address, but in fact, they originate their traffic from elsewhere.
Proxies can be a great way to protect your location while browsing the internet. Distorting proxies act as a decoy and can be set to appear internationally, so people know it's natural for you to visit the site. Some sites will block distorting proxies, which may keep the user from accessing the site they need.
Data Center Proxy
In this type of proxy, the requests are not serverd by the ISP but they are served by a 3rd party managing solution managing the data center.
Gathering data quickly and efficiently is a necessity. For this reason, data center proxies are becoming popular as they can provide quick response times with a low-cost solution. Some people may not like the fact that they are less anonymous with these tools but they do offer the benefit of saving time & money. It's important to weigh your options when choosing which tool to use.
A residential proxy provides you the IP that is assigned by an Internet Service Provider (ISP) and not a data center.
Each residential IP is a real device that points to a specific physical location. When someone uses one of your residential IPs, it appears as if they are browsing from a particular residential location. This makes our residential proxy network highly effective and immune to blocks.
A public proxy is accessible free of cost by anyone and offers IP masking, so your identity remains concealed as you visit sites.
Public proxy servers are a great option for users who don't need the security or speed of private proxies. They're free and easy to get, but they can be slow because they often have to serve a majority of people that just want the content for free.
When you use a public proxy, you are more susceptible to cyber threats.
A shared proxy server gives you an IP that is shared among many users. Even though the IP is fixed, you can browse the web from a location of your choice.
Shared proxies are a sensible choice for people who don't have loads of money to spend and are looking for something reliable. Shared proxies are relatively low-cost. The downside for it is, If you get banned while browsing, it’ll be because someone else at the proxy did something bad - not that you did anything wrong.
A secure sockets layer (SSL) proxy provides encryption and decryption between the client and the server. You don't need to worry about your identity being exposed to either the client or the server, as it can only be traced back to a proxy-issued IP address with an anonymous subnet mask.
Google prefers that sites have SSL on their servers, which is why an SSL proxy can help improve their search engine rankings. On the downside, on an SSL proxy websites can't be cached- so if you keep revisiting them, browsing may be a bit slower than usual.
A rotating proxy assigns a different IP address to each user when they connect. They are given an IP that is different from the address of any previous user who has connected before them.
Rotating proxies are ideal for heavy web scrappers who need high-volume and continuous offsite access to web pages. They let you explore the same website over and over without the website being able to identify you. Be careful when looking for a rotating proxy service as there are some that contain public or shared proxies. This could expose your data.
Forward proxies address browser requests that come in but reverse proxy addresses requests from the web servers to the browsers. I have discussed this in detail in the Reverse Proxy section above.
And that's a wrap! Hi, I am Gourav Dhar, a software developer and I write blogs on Backend Development and System Design. Subscribe to my Newsletter and learn something new every week - https://thegeekyminds.com/subscribe