Briefly explain http2 multiplexed

In HTTP / 1, every request to establish an HTTP connection, that is, we often say that the 3-way handshake waved four times, in the course of this process takes up considerable time once the request, even opened the Keep-Alive, resolve the problem of multiple connections, but there are still problems on both efficiency:

  • The first one: serial file transfer. When a request for a file, b file to wait, wait for a connection to the server, the server processing the file, the server returns the file, these three steps. We assume that this is a three-time with 1 second, so when a file is 3 seconds, with a time of 6 seconds b file transfer is complete, and so on. (Note: this calculation there is a precondition, that is, the browser and the server is a single-channel transmission)
  • Second: Too many connections. We assume Apache sets the maximum number of concurrent 300, because the browser restrictions, the maximum number of browser initiated request is 6, which is the highest concurrent server can carry 50, 51 when the first personal visit, you need to wait in front of a request processing is completed.

Multiplexing HTTP / 2 is to solve the above two performance problems.
In HTTP / 2, there are two very important concept, namely a frame (Frame) and the flow (stream).
Frame represents the smallest unit of data, each frame identifies the stream to which the frame belongs, the stream is a data stream composed of a plurality of frames.
Multiplexing, there may be a plurality of flow is in a TCP connection. In other words, can send multiple requests, the peer can know which frames identifies the request belongs. With this technique, you can avoid HTTP old version of HOL blocking problem, which greatly improves the transmission performance.

Http lack of knowledge of my very first record in this

Guess you like

Origin www.cnblogs.com/wangxi01/p/11202201.html