HTTP2.0 protocol
HTTP2 The draft agreement has come out, read the Chinese version of the Internet, HTTP2 as much as possible compatible with http1.1. Improved the http1.1 of the Protocol.
Disadvantages of http1.0 and http1.1:
1.http1.0 only allow the current outstanding request to be established on one connection
2.http1.1 pipeline only partially handles request concurrency and packet congestion, and clients establish TCP connections to reduce latency
3. The header field is often repetitive and lengthy, the packet becomes larger, it is prone to clogging the initial TCP port, and several TCP connections are established
HTTP2X Protocol Solution:
1. Optimize the semantic mapping of the underlying connection, such as creating interleaved requests and responses on the same connection, using a highly efficient coded header field
2. Allow requests to be prioritized so that more important requests are completed first
Features of the HTTP2 protocol:
The most basic protocol unit in 1.HTTP2 is the frame. Each frame has a different type and purpose. For example, the header (HEADERS) and data frames make up the basic HTTP request and response. The frame contains an HTTP header field that is compressed. HTTP requests can be highly redundant, so compression can significantly reduce the size of requests and responses.
2. Request multiplexing: Multiple HTTP request response interchanges are allocated on one stream, and the streams are largely independent of each other because a request
Blocking and terminating does not affect the processing of other requests.
3. Flow control and prioritization ensure proper use of multiplexed streams, and flow control helps ensure that only accepted data is propagated and prioritized to ensure that limited resources are used for critical requests
4. Added a new interactive mode, that is, the server can push messages to the client. Server push allows service-side predictive client to send
Data to the client, switched networks used to block potential latency growth. The server implements the push by reusing a request sent as a push_promise frame, and the service can send a response to the composition request in a separate stream.
HTTP2.0 protocol