Reverse Proxy
Baidu Encyclopedia on the interpretation as follows:
A reverse proxy (Reverse proxy) means to accept a connection request on the Internet with a proxy server, then forward the request to a server on the internal network and return the results obtained from the server to the client requesting the connection on the Internet, At this point, the proxy server behaves as a reverse proxy server.
Refer to the following figure to get a clearer picture of this process:
In layman's terms, a reverse proxy is a server responsible for forwarding requests and requesting results, which in the client's view is the server. But in fact it's just the entrance and exit of the service, and the server that really handles the request and returns the result is the one it sends the request to.
For example: We let Nginx listen on port 80, but in fact the service-handling Tomcat uses a port of 8080. Then, when the client sends the request to Nginx,nginx, the request is forwarded to the Tomcat,tomcat business logic that handles the response, and the processing result is returned to the Nginx, which is returned to the client by Nginx. function
Secure the site and create a barrier between the Internet and the server. Sensitive information encryption prevents URL rewriting from being exposed, acting as a true server alias to prevent attacks, etc.
Provide caching functions, reduce the pressure of real servers, cache static files, such as css,js,html, pictures and other static resource files.
Realize load balancing, distribute the request evenly, balance the pressure of each server;