Find out what a reverse proxy is and its usefulness!
When we talk about servers, we usually hear the term "reverse proxy".
In this article, I want to explain what a reverse proxy is and what it does.
Let's talk about what isagent. A proxy server is a server that accepts client connections, and the client actively configures the proxy server in the network settings on its computer.
When the client connects to the server, the request always goes through the proxy server.
There are many uses for this approach. Companies and organizations can set up proxy servers to filter connections, provide higher security, and log traffic. If you do not use a proxy, the client will not be able to access the external network. Proxy servers can also be used to provide privacy and avoid network restrictions imposed by national/regional governments.
A kindReverse proxyThe other hand is set by the server. It is completely transparent to the client, they don't know the existence of the middleman, but it is very useful on the server to filter requests and send them to the appropriate service that processes them.
This is commonUse Nginx as a reverse proxy, And wrote some services in Node.js, these services listen to internal ports, and these ports are not accessible from the outside.
In this case, Nginx acts as the main request handler and sends the appropriate request, for example, to link a special subfolder or URL to a specific service.
We can have 2 different Node.js applications to do 2 completely different things, and users don't need to know this.
In addition to this routing function (which is the most commonly used routing function by our developers), the reverse proxy can also filter and defend against attacks acting as a firewall, introduce caching, configure SSL, handle load balancing, A/B Testing, and more.
More web tutorials:
- Introduction to WebSockets
- How HTTP requests work
- List of HTTP request headers
- List of HTTP response headers
- HTTP and HTTPS
- What is RFC?
- HTTP protocol
- HTTPS protocol
- The curl guide for HTTP requests
- HTTP cache
- List of HTTP status codes
- What is CDN?
- HTTP/2 protocol
- What is the port
- DNS, Domain Name System
- TCP protocol
- UDP protocol
- Introduction to REST API
- How to install a local SSL certificate in macOS
- How to generate a local SSL certificate
- How to configure Nginx for HTTPS
- A simple Nginx reverse proxy for serving multiple Node.js applications from subfolders
- What is a reverse proxy?