#3.2 Reverse Proxy vs Forward proxy

Hussein Mhadi
4 min readAug 6, 2023

--

In the previous article, we talked about forward proxy, and it was a simple article about it that explains its use and also its work. You can find the article in this link : Reverse Proxy vs Forward proxy

Now we’ll go back to the root of the matter, which is the reverse proxy
We mentioned at the beginning of the article that a reverse proxy will provide a number of valuable features for a website or a web system, but first, how does it work and why does this proxy appear??

What causes the reverse proxy to appear ?

Previously, the website was located on a server called the “primary/original” server, where the client could connect to this site, i.e. to this server directly, but problems arose when the number of requests increased, which leads to poor performance of the server and the provision of services, also another problem related to Knowing the address of the server that contains the website, and this represents a security threat, also the problem of bandwidth capacity, which will represent a burden on the owner of the website and increase costs, and other problems.

so it required the presence of another component that works as an intermediary in order to provide a number of features that make it a distinct site It meets user needs.

How does a reverse proxy work?

It receives the request from the client and then forwards it to the server that can provide this service. Now you will say that it is similar to the forward proxy.

No, in order to clarify the matter, we will repeat the previous example, but according to the work of this proxy, You want to access a video is located on Zoo.com and the address is 198.160.11.18. When you request the video, the request will go to the Internet and then to the reverse server whose address is 200.130.10.12, then this server directs the request to Zoo.com with specifying the server that can provide the service, for example, the server whose address is 198.160.11.18 , then the site sends the request to the address of the Reverse proxy server , which in turn sends the request to the Internet with the address of the client .

So, through the example, we can understand that the website can be copied on more than one server, and a server is placed in the front that receives requests and directs the request to the server that can provide the answer, and then returns the request from this server to the client, if it is similar to the load balancing process where it is distributed The loads of requests are on all the servers that own this website.

The benefits we get from this agent !

1. Load balancing, as it distributes requests to all the servers that own this website, by this we can say that the availability of the site has become excellent, and also the response speed and the reduction of waiting for a response.

2. Service availability , No matter how many requests increase, the website can provide the service, and also if there is a breakdown or pressure on one of the servers, the rest of the servers can receive the rest of the requests and replace them.

3. Security , because the client only knows the reverse proxy address and cannot access the server address that holds the website, so this provides a layer of protection and prevents or significantly reduces DoS attacks.

4. SSL decryption , the data encryption / decryption command adds weight to the server because it requires time and this increases the server’s busyness, so a feature can be added in the reverse server in order to perform this function, thus reducing the weight carried by the original server.

Conclusion
The reverse server provides several functions, including security, availability, speed, load balancing, distribution, etc., but from the other side, the cost that is associated with using such a thing must be considered, as it requires engineering resources, whether for programs or hardware, and also a large investment in hardware, but there is A number of companies provide these features by subscribing to the CDN service, which provides all the services and features provided by the reverse proxy.

I hope you like the article, good luck 😊😊😃

Reference

1 What is a reverse proxy ?

2 How To Set Up a Reverse Proxy ?

3 What Is a Reverse Proxy Server ?

--

--

Hussein Mhadi
Hussein Mhadi

Written by Hussein Mhadi

Software Engineer/Architect 💡 Founder programmercoffee.xyz☕ Web Developer ,Architecting Solutions,Consulting & Team Leadership 🎯 Writer and Trainer 🔥

No responses yet