Proxy

Proxy

In this tutorial, we are going to discuss about proxy, another essential system design concept. Many of us have used tools that help us maintain our privacy or anonymity, or remain safe from third-party users eavesdropping on our connection. Do you know how it works and how it is useful? Let’s find out!

What is Proxy server?

A proxy server is an intermediate piece of software or hardware that sits between the client and the server. Clients connect to a proxy to make a request for a service like a web page, file, or connection from the server. Essentially, a proxy server (aka the forward proxy) is a piece of software or hardware that facilitates the request for resources from other servers on behalf of clients, thus anonymizing the client from the server.

Let’s see what types of proxies we have, how they can be helpful, and the technologies we can use.

1. Forward Proxy

A forward proxy often referred to as a proxy or proxy server, is a server that sits in front of a group of client machines. When a client issues a request to communicate with a server, instead of going directly to the server, the request goes to the forward proxy, which then forwards the request to the server.

In other words, when clients send requests to websites on the Internet, the forward proxy intercepts these requests and communicates with the servers on behalf of the clients, acting as an intermediary. This allows us to perform certain actions before or after the request gets through to the original destination.

Forward Proxy

Forward Proxy is used to mean that requests made by the internet are first directed by this proxy server and then forwarded to the requested website. This proxy server hides the requesting party’s IP address and changes the origin of the request to websites. It can also be used for purposes such as prohibiting or limiting access to certain websites.

Example

A company wants to control the time its employees spend online and to limit access to certain websites. For this purpose, it installs a Forward Proxy server on the corporate network. Employees connect to the internet using their computers on the corporate network, and all their requests are forwarded by this Forward Proxy server. The Company may prohibit or restrict access to certain websites through this server. In this way, the time employees spend on the Internet is kept under control and access to certain websites is limited.

Advantages
  • Forward Proxy servers increase the security of Internet traffic by hiding the IP address of the requesting party.
  • It can be used for purposes such as prohibiting or limiting access to certain websites.
  • Forward Proxy servers can direct internet traffic uninterruptedly and quickly, thus increasing internet speed.
  • Forward Proxy servers can record all internet requests and use these records to examine.
Disadvantages
  • Installing and configuring Forward Proxy servers requires an additional system requirement.
  • Forward Proxy servers need an additional stage to route internet traffic, which can degrade performance.
  • Forward Proxy servers are difficult to configure correctly, and configuration errors can negatively impact security and performance.
  • Setting up, configuring and operating Forward Proxy servers is a costly process.
  • Forward Proxy servers must be constantly updated and maintained, otherwise their security and performance may be affected.
2. Reverse Proxy

A reverse proxy is a proxy server that sits between one or more servers. Reverse proxies are the exact opposite of forward proxies in terms of their interaction pattern: Forward proxy acts on behalf of clients, a reverse proxy acts on behalf of servers. So, unlike a forward proxy, which is used to protect clients, a reverse proxy is used to protect servers.

Reverse Proxy

Reverse Proxy is a network server used to route requests to internet servers. Reverse Proxy hides the IP address of the requesting party on the internet and allows it to make requests to the servers. In this way, the servers prevent requests from the internet directly and its security is increased. In addition, Reverse Proxy servers offer benefits such as distributing load, improving performance, and reducing update and maintenance requirements.

Example scenario of a Reverse Proxy for an e-commerce website using the following set of web servers:

  1. The requester uses a web browser to search for a product on the e-commerce website.
  2. The request is forwarded to the Reverse Proxy server.
  3. The Reverse Proxy server forwards the request to the appropriate web server.
  4. The web server sends a list of products in response to the request.
  5. The Reverse Proxy server sends the product list response to the requesting party.
  6. The requester selects a product from the displayed product list and completes the purchase.
  7. Reverse Proxy server directs you to the appropriate web server, which will make the purchase.
  8. The web server completes the purchase and sends the response to the Reverse Proxy server.
  9. The Reverse Proxy server notifies the requesting party that the purchase has been completed successfully.

This scenario shows that the Reverse Proxy server increases security by hiding the IP address of the requesting party on the internet and improves performance by distributing the load. In addition, the fact that the Reverse Proxy server can manage all requests from a single point reduces the need for updates and maintenance.

Advantages
  • Reverse Proxy servers hide the IP address of the requesting party on the internet and allow them to make requests to the servers. In this way, the servers prevent requests from the internet directly and its security is increased.
  • Reverse Proxy servers allow requesting servers to distribute the load and manage requests made between servers. In this way, servers perform faster and better.
  • Reverse Proxy servers increase the scalability of servers by managing requests and load balancing between servers.
  • Reverse Proxy servers allow it to manage all requests from a single point. In this way, updating and maintenance requirements can be made and facilitated from a single point.
Disadvantages
  • Reverse Proxy servers are more difficult to install and configure than standard web servers and require more technical knowledge.
  • Reverse Proxy servers run the risk of losing some of their performance by managing requests and routing requests between servers as an additional step.
  • Reverse Proxy servers impose an additional maintenance requirement on servers by managing requests and load balancing between servers.
  • Reverse Proxy servers increase the dependency of servers by managing requests and load balancing between servers. The servers can run while the Reverse Proxy server is running, but if the Reverse Proxy server is not running, the servers will not work either.
  • Reverse Proxy servers increase the cost of servers by managing requests and allocating load between servers.
Reverse Proxy vs. Load Balancer

Reverse proxy servers and load balancers are components of a client-server system design. They both act as intermediaries between clients and servers, performing efficiency-enhancing functions.

A load balancer distributes incoming client requests among a group of servers, returning the response to the appropriate client from the selected server. When a site requires multiple servers, load balancers are commonly deployed because a single server cannot efficiently handle the volume of requests. So the task of the load balancer is to distribute requests in a way that makes the best use of each server’s capacity and prevents overload on any server.

A reverse proxy accepts a request from a client or set of clients, forwards it to a server, and returns the client’s response from the server. Deploying a reverse proxy often makes sense, even with just one web server or application server. While deploying a load balancer only makes sense when multiple servers are available.

That’s all about Proxy in system design. If you have any queries or feedback, please write us at contact@waytoeasylearn.com. Enjoy learning, Enjoy system design..!!

Proxy
Scroll to top