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 the club,

stay in the loop.

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

What is cloud native?

What is cloud native?

Cloud native is a term that has been around for a while, but it’s still not well understood. The term was first used in 2010 by Adrian Cockcroft, then VP of cloud architecture at Netflix. He defined it as: “The application is designed from the ground up to take...

Three Monsters: The path to Self Growth

Three Monsters: The path to Self Growth

If you ever take a journey down your daily journal, you would find certain traits that set you back and harm your trajectory to success. Now, if you are busy and don’t have time to write a journal (aka no time for self-discovery) but want to discover these traits (I...

Service Mesh: The Gateway to Happiness

Service Mesh: The Gateway to Happiness

Microservices have lead the human race away from monolithic applications to a cloud native landscape. The dominance of microservices (containers) has impacted the modern development environment to be scalable, flexible and continuous. But as the number of...

CNCF: Forefront of the Cloud Native Landscape

CNCF: Forefront of the Cloud Native Landscape

Cloud Native Computing Foundation or CNCF is a term you would see flying all around the cloud native landscape. You might know about it a bit as a prominent organization that maintains your frequently used open source tools like Kubernetes, Prometheus (and more!)...

Kubernetes: Everything You Need to Know about it

Kubernetes: Everything You Need to Know about it

The demand around scalable and reliable services is increasing every day exponentially. The market is driven by customers demanding their favorite services to have zero downtime and companies that lose millions of dollars for every minute they’re down. If you have...

Turbo-charge with Container Orchestration

Turbo-charge with Container Orchestration

Managing containers while traffic increases or decreases in cost-effective ways round the clock sounds challenging and complex without tools. We, as cloud-native citizens, crave scalability and agility. But our containers going into production without the cloud-native...

Unikernel Vs Container Vs VMs: Here is what you should use

Unikernel Vs Container Vs VMs: Here is what you should use

If you’d gone through Containers, Unikernels and VMs, I would bet you’re confused about which one to try for your new venture. It’s normal and happens to everyone while experimenting with adopting new technology. Remember the age-old dilemma of you thinking which...

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