First, Nginx forward and reverse proxy
1, Nginx of the forward agent
The forward proxy is a server located between the client and the original server (Origin server), in order to obtain content from the original server, the client sends a request to the agent and specifies the target (the original server), and the agent then forwards the request to the original server and returns the obtained content to the client. The client must make some special settings to use the forward proxy.
2, Nginx of the reverse proxy
Reverse proxy in the computer world, because the processing client (user) request ability of a single server has a limit, when the user's access request is flooded, it will cause the server to be busy, can use multiple servers to share thousands of user requests, these servers provide the same service, for users , it doesn't feel any difference at all. Accept the client's request on the server side, then distribute the request to the specific server for processing, and then feedback the server's response results to the client.
3, graphic and positive to the agent
Second, nginx Why to use the reverse proxy
1, convenient server distribution expansion
There is a limit to the ability of a single server to handle client requests, and if the request is too large, the server is busy, so using multiple servers to share the user's request processing, these servers provide the same service, no difference for users. Then a load-balancing device is needed to distribute the user's request to the idle server, and the server returns the results to the load-balancing device, which is then returned to the user by the load balance. This way, when adding/removing a server, you only need to modify the load-balanced list of servers without affecting the server;
2. Safety
To avoid the direct exposure of IP and port to the Internet, the host is protected from exploitation security vulnerabilities, the number of proxy servers is limited, security protection is more convenient.
End