DEV Community

Cover image for What is a reverse proxy and how it works?
Duomly
Duomly

Posted on • Originally published at blog.duomly.com

23 6

What is a reverse proxy and how it works?

This article was originally published at https://www.blog.duomly.com/6-most-popular-backend-questions-and-answers-for-beginners/#what-is-reverse-proxy-and-how-it-works


What is a reverse proxy and how it works?

I think that at first, I should explain what proxy is, also called the forward proxy. Let’s take a look at the visualization of the forward proxy.

What is a forward proxy?

In this image, you can see how the communication with the forward proxy looks like. The request is sent from the client, and then the request takes over the proxy server, which communicates with the servers to get the data and send them back. 

There are a few reasons why the forward proxy can be used. 

First of all, it’s used to avoid browsing restrictions, for example, companies sometimes limit access to the internet, and the proxy can be used to overcome it. 

The second idea is why the forward proxy may be used to stay anonymous on the internet because when we send the request through the proxy, the only visible IP is the one form the proxy server.

Now, let me explain what the reverse proxy is, and for that, let’s take a look at the other graphic.

What is a reverse proxy?

In the case of the reverse proxy, the proxy server is between the network and the application origin server with data. When the client does a request, it’s sent to the network, and then it’s grabbed by the reverse proxy server, then the request sent to the origin server, and the response is returned.
The main advantages of using the reverse proxy server are: 

  • preventing the attacks like DDoS, because the attackers won’t be able to hit the origin servers of the application, just the proxy server;
  • helps in caching content;
  • provides the SSL encryption;
  • can help to distribute the requests to multiple origin servers;
  • can add basic HTTP access authentication to a web server that doesn’t have one.

There exist the third-party reverse proxy servers like Cloudflare.

Duomly - Programming Online Courses

Thank you for reading,
Anna from Duomly

Billboard image

Deploy and scale your apps on AWS and GCP with a world class developer experience

Coherence makes it easy to set up and maintain cloud infrastructure. Harness the extensibility, compliance and cost efficiency of the cloud.

Learn more

Top comments (1)

Collapse
 
jlrxt profile image
Jose Luis Ramos T.

Muy interesante gracias Ana de Duomly.

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay