DEV Community

Cover image for Proxy : Simplified
Saborni Bhattacharya
Saborni Bhattacharya

Posted on • Edited on

Proxy : Simplified

Let us imagine, you have written a letter for your dear beloved and you want to send it to them. However, you don't want anyone else to know that the letter has been written by you other than your beloved. So, you send this letter through the hands of one of your trusted friends.

This trusted friend is known as "proxy".

In this blog, we will discuss about what is "proxy" in scope of system design and what are the different types of proxy and their corresponding use cases.

A typical client-server pattern comprises of a client that requests for resources to server.
cs
A proxy is a software or hardware component that acts as an intermediator between a client and a server thereby protecting the direct connection between them.
cps

Features of Proxy

  1. Client privacy - The proxy conceals the client's IP address other identifying information, making the client's online activities more anonymous and private.
  2. Caching - Proxies can cache frequently accessed content thereby reducing the load on the target server and improving response times for the client.
  3. Filtering and access control - Proxies can be used to filter content, block certain websites, or control access to resources based on defined policies.
  4. Security and monitoring - Proxies can be used to monitor and log client activities, providing security and compliance benefits for organizations.
  5. Protocol transformation - Proxies can translate between different network protocols, allowing clients and servers using different protocols to communicate.

Types of Proxy

There are two types of Proxy:

Forward Proxy

Forward Proxy, also known as proxy server or web proxy, is a server that is located in-front of a group of clients. Once a request is received from clients, web proxy forwards the traffic over internet connectivity to the web servers.
fwdp
Pros:

  • Outbound access control.
  • Caching frequently accessed resources.
  • Monitoring and logging for outbound traffic.
  • Anonymity and privacy of clients.
  • Content filtering.

Cons:

  • Single point of failure.
  • Performance overhead due to additional request processing.
  • Complexity of the configuration.
  • Limited security despite anonymity.

Reverse Proxy

Reverse Proxy is a server that sits in-front of the servers, intercepting the incoming client requests over internet or dedicated network. Once a request is received from clients, reverse proxy forwards the traffic to one of the web servers.
revp
Pros:

  • Load distribution to multiple servers.
  • Protection to backend servers.
  • Handling of SSL termination.
  • Caching and compression.
  • Centralized logging and monitoring.

Cons:

  • Single point of failure.
  • Complexity of the setup.
  • Potential bottleneck during high traffic.
  • Latency due to additional hops.

Depending upon your use case, you need to select a specific type of proxy or both.

Load Balancer

Load Balancer mainly helps us with distribution of incoming traffic to backend servers. It is also capable of scaling to handle any sudden burst of traffic.
LB

How Load Balancers differ from Reverse proxy?

The main use of Load Balancer is to distribute incoming traffic across two or more webservers serving identical functionality. In addition to load balancing capability, reverse proxy also has caching and security features. It is important to note that reverse proxy can act as a load balancer while the reverse is not true.

Summary

Hence, we have learnt about how a proxy works in between client and server groups. Also, how a forward proxy differs from a reverse proxy. Also, the difference between a Load Balancer and a Reverse proxy.
In my upcoming blogs, I will explain how Load Balancing works.

This is not endorsed by any org, all my opinions.

For more contents, follow this page and do subscribe to my YouTube channel -

Saborni Bhattacharya - YouTube

SA@Amazon || Not a tech buff but I love to make tech content to help others

favicon youtube.com

Top comments (0)