Proxy Servers: The Captivate Shield

Published 26.04.2021

Author Hrittik Roy

Categories Engineering

If you have been scrolling the web, you would have heard about the terms proxy and reverse proxy at least once. You might know a bit of them or might be completely unaware of what they are. This is completely okay with me, and if you have the desire to understand them, let’s continue.

In this post, we would get through proxy servers (forward & reverse) with its advantages. For few mins forget everything you know, and let’s start from scratch!


What is a Forward Proxy?

A proxy (aka forward proxy) server acts as a connection point between users and the internet. It’s a server that acts as an intermediary between end-users and the web pages.

Whenever you connect to the internet, it uses an IP address. This IP address is similar to your home’s address where packages are received and acts as a return address while sending parcels.

In a network instead of a physical parcel, we have packets of data circulating.

Simply a proxy server is a computer connected to the internet with its own IP address and channels your data to other servers while masking your IP.

How does a Proxy work?

When you make a web request, it first goes via the proxy server. After that, the proxy server makes your site request on your behalf, collects the response from the web server, and forwards the web page data to you so you can view it in your browser.

forward proxy server
Forward Proxy Source: Psychz

When the proxy server forwards your web requests, it may alter (encrypt) the data you send while still delivering the results you anticipate. Your IP address can be changed by a proxy server, because of which the web server doesn’t know where you are in the world.


Advantages of Proxy Server

Security

Remember the time during your childhood when your parents were there to guard you against any outside influence. For example, if you need something like a toy. You didn’t go to the shop, but you asked your parents to get you one.

They went to the store and bought that for you. You didn’t have to deal with any external people, and they used to make sure you remain safe.

Well, we can think of proxy similarly. The proxy server provides your intranet with a layer of security or a firewall. Now people can’t infiltrate your computer or network via snooping onto your actual IP address.

Better Management

Behind the closed intranet, you might have many machines looking to connect to the insecure internet. A proxy helps you accumulate all of the requests from various clients and then pass them on to the internet.

Caching

When you access a web page over the internet, the proxy server caches the web page for any subsequent visits. It saves bandwidth for the remaining machines inside the intranet and increases performance when the other clients request the same page.

Learn More about caching here!

Encryption

The request from the client machine to the other servers is encrypted when gone through a proxy server. Only the information necessary to pass the request to another server is present, and this provides you with extreme security measures as your IP is masked.

If you wonder how Tor, the most secure network on the internet, works, then proxy server sets is the answer.


What is a Reverse Proxy?

In the forward proxy, the internet servers weren’t aware of the masked client, but things take a turn in reverse proxy. The reverse proxy is responsible for masking the servers from the outside internet, and this makes your servers get the same security and caching as the clients on a forward proxy get.

reverse proxy server
Reverse Proxy Source: Psychz

Moreover, you have few more advantages that make reverse proxy a must to have a toolkit in modern architecture.


Advantages of Reverse Proxy

Request Filtering

A server’s job is to fulfil the client’s request. But sometimes, some of the requests comes out to be malicious. Proxy servers can block specific IPs to access the web servers and keep the system sound.

Load Balancer

Load balancing is critical to any modern infrastructure as it keeps the servers healthy. Load balancing is a way to divert traffic to other parallel servers to load on one server, not too much. Another used case of a load balancer is to help developers keep the system functional while updating to a new version.

For example, you can be upgrading your system to v1.1, but you need your application functioning. So you can divert your incoming traffic to v1.0, the older version while your system is upgraded. We call this a rolling deployment.

Moreover, following along with this principle of load balancing, you can also perform A/B testing (canary deploy), i.e. serve two or more versions of service to different users. Canary deploys help you gather data and test which is the best implementation among two or more options.

Content Distribution Networks

One of the other widespread use cases of a reverse proxy is a CDN. Content Distribution Networks are essential for the modern infrastructure as they help people to access content with very low latency and load time.


Final Thoughts

Proxy servers (forward and reverse) are quite an essential component in modern system designs. Every system architect needs them for a more robust and efficient system, and having a grasp of these concepts is essential. Nginx and HAProxy are two popular examples and here are few links that would help you to get started!

I hope this post helped you understand the use cases and the functionalities of these critical infrastructures running the internet.

Happy learning!

Join 100+ cloud native enthusiasts

and stay in the loop on modern software development.

Sign up to receive exclusive content around cloud native software development right into your inbox.

We don’t spam! Read our privacy policy for more info.

More stories from our blog

How To Install Docker on Ubuntu 20.04?

How To Install Docker on Ubuntu 20.04?

Docker is an open-source tool that makes managing application processes in containers much easier. Containers allow you to run your programmes in separate processes with their own resources. Containers are comparable to virtual machines, except they're more portable,...

Answer to Everything isn’t 42, it’s Family

Answer to Everything isn’t 42, it’s Family

We’re experiencing digitisation. An era where every person has a voice, and it doesn’t matter if he’s wise. There’s more motivation circulating the vast stretches of the internet than it’s required. This would be good in a theoretical world, but if you seek the truth,...

What’s new in Gitlab 14? 🦊

What’s new in Gitlab 14? 🦊

GitLab 14 is out and fans must be thrilled to know about all the new features along with all the fixes and removals. In this post, we will go through the many changes and improvements, bug fixes, and some remarkable deprecations. We will see all of that here. So,...

k8s vs k3s: The Comprehensive Difference

k8s vs k3s: The Comprehensive Difference

Kubernetes is undoubtedly a champion in the container orchestration world. But currently, we see that K3s or a lightweight Kubernetes distribution which is light, efficient and fast with a drastically small footprint levelling up. Businesses nowadays scratch their...

What’s new in Fluentbit v1.8.1?

What’s new in Fluentbit v1.8.1?

Fluentbit is a lightweight and fast data processor and forwarder for Linux, BSD and OSX. And, for Fluentbit fans, there is good news as they have released their new update with lots of new features and fixes. We will have a look at all of them below. New Metrics...

What’s new in Envoy v1.19.0?

What’s new in Envoy v1.19.0?

Envoyproxy introduced its new version, 1.19.0, recently, and it came with many changes and improvements from the previous ones. We can see more stability in this version, along with specific bug fixes. So, without waiting any further, let’s see what the new version...

What’s new in Vitess 10?

What’s new in Vitess 10?

Vitess 10 is released with many excellent features and also many bug fixes that were bothering the user base. We are going to see all the features and exciting announcements. So, Let's roll! Major Themes in Vitess In this release, we can see that Vitess Maintainers...

What’s new in Contour 1.17.0?

What’s new in Contour 1.17.0?

Contour 1.17.0 is out with a layer seven HTTP reverse proxy for Kubernetes clusters. The new version has arrived with many new features and several fixes, which will make the functioning of the ingress controller smoother. More activities within the community came...

What’s new in Prometheus 2.28?

What’s new in Prometheus 2.28?

Prometheus 2.28 is out. If you don't know, Prometheus is an excellent open-source system monitoring and alerting toolkit. Let's have a look at those features and have a look at the changelog. Displaying Trace Examplers in the Graphic Interface From the previous...

GPT-J: GPT-3 Democratized

GPT-J: GPT-3 Democratized

GPT-J is the open source cousin of GPT-3 that everyone can use. The open source transformer is all about democratizing transformers and with 6b parameters it’s the largest transformer available. Read more here

Interested in what we do? Looking for help? Wanna talk about software strategy?