A reverse proxy server is a server that holds the information regarding the original servers in it. It acts as the front-facing entity for the client request. Whenever a client makes an HTTP request, it can directly go to the application server. However, if the application server is written in a programming language, then you need a translator that can turn the application response into a response understandable by the clients. Common Gateway Interface (CGI) does the same thing.
We can run a simple Go HTTP server and it can serve incoming requests (no CGI is required). We should also protect our application server from Denial of Service (DoS) attacks. So, why are we using another server called Nginx? Well, because it brings a lot of things into the picture.
The benefits of having a reverse proxy server (Nginx) are as follows:
- It can act as a load...