[Web] HTTP Proxy and Reverse Proxy

direct interview

It is to directly access the server from the client, which is equivalent to going directly to the manufacturer to buy Coke, and there is no middleman to make the difference

HTTP proxy

HTTP proxy means that the client first accesses the proxy server, and then the proxy server accesses the server, and the proxy server forwards the client after receiving the response, just like the process when I go to the store to buy Coke

configure proxy server

The browser does not know the location of the proxy server, so we have to take the initiative to tell the browser our proxy server
![[Pasted image 20230529174626.png]]

reverse proxy

If the forward proxy is actively forwarded by the proxy server, then the reverse proxy is proxied, and the client does not know that its request is proxied, so this process does not require client settings

It’s like when I go to the manufacturer to buy soda, I think the manufacturer is the source, but the manufacturer also buys from other places

benefit

    1. Load balancing: The reverse proxy can distribute client requests to multiple back-end servers according to the load conditions, thereby achieving load balancing and improving the performance and availability of the entire system.
  1. Security: The reverse proxy can hide the IP address and domain name of the back-end server, which improves the security of the server. At the same time, the reverse proxy can also use some security control strategies, such as firewalls, access control, anti-spam, etc., to protect the back-end server from attacks.

  2. Cache: The reverse proxy can cache static resources, such as pictures, style sheets, JavaScript files, etc., thereby reducing the number of client requests and improving access speed. At the same time, the reverse proxy can also use some cache strategies, such as cache time, cache size, cache strategy, etc., to optimize the cache effect.

  3. Grayscale release: The reverse proxy can implement grayscale release, that is, gradually release the functions of the new version to some users for testing without affecting official users. The reverse proxy can distribute requests to different back-end servers according to some rules, such as user ID, IP address, etc., so as to achieve grayscale publishing.

  4. Interception and redirection: The reverse proxy can intercept the client's request, and filter or redirect the request according to some rules, so as to realize some customized requirements, such as restricting access and redirecting certain URLs.

Guess you like

Origin blog.csdn.net/csxylrf/article/details/130933762