Make a summary every day, persistence is victory!

/** @date 2021-06-28 @description 图 文 HTTP - Chapter 5 - A Web server that works with HTTP */Copy the code

one

  1. HTTP / 1.1The specification allows an HTTP server to be set up using a virtual servermultipleThe Web site
  2. The domain nameAnd finally, convert toThe IP addressSo it’s possibleMultiple domain namePoints to theThe sameThe IP address, for proper access, needs to be in theThe Host firstOf the specified host name or domain nameURI
  3. Proxy: The basic behavior of a proxy is that after receiving a request from a client,forwardingTo other servers, without changing the URI, directly forward to the server holding the resource ahead (source server)
  4. During HTTP communication, multiple proxy servers can be cascaded. In this case, requests and responses are forwarded through several chained servers, which need to be forwardedViaThe header field is marked byHost information

5. Classification of agents: according toWhether to use cachingwithWhether to modify the packetTo classify

Whether to use cache: Whether to store resource copies on the proxy server when forwarding responses transparent: Whether to modify the packets when forwarding requests or responses without any processing is called transparent proxyCopy the code
  1. Gateway: Similar to a proxy server, but a gateway can be used by a server on a communication lineThe HTTP protocolEncryption can be improved over the communication line between the client and the gatewaysecurity
  2. The tunnel can establish a communication line with other servers as required. Encryption means can be used to communicate, ensuring that the client and the server can communicateSecure communication
  3. Caching is stored on the proxy server or local clientA copy of the resource, and can be read directly when requesting resources, reducing the access to the source server and saving communication traffic and time
  4. In the proxy serverCache serverWhen receiving the response from the source server, the resource is saved and the resource in the cache server is directly used in the subsequent access, which can reduce the processing of the request by the source server

10. The cacheeffectiveness: When the source server has updates, the resource copy of the cache server is not the latest resource. Therefore, it is necessary to determine the validity of the resource. If there are updates, obtain the resource copyThe latestResources, noDirect returnCache resources on the server

11. The clientCache: also available inThe clientBy keeping a copy of the resource, you do not need to request the same resource to the server each time, but also need to confirm the cached resource to the source servereffectiveness