Last update：2022-04-11 15:10:10
HTTP/2 is a major revision of the HTTP network protocol used by the World Wide Web. CDNetworks supports a whole-process HTTP/2, offering HTTP/2 service for end users even when the origin site does not support HTTP/2.
Compared with HTTP/1.x, HTTP/2 provides special features such as multiplexing, HTTP header compression, request prioritization and server push. HTTP/2 speeds up content delivery significantly and solves the problem that clients have difficulties in obtaining real-time data from the server in HTTP/1. x.
Multiplexing is to transit multiple data units over a single connection. Under the traditional HTTP/1.1, the browser will set a number limit on requests for the same domain name at the same time, and the requests exceeding the number will be blocked. HTTP/2 adds a binary framing layer between the application layer and the transport layer, allowing multiple request-response messages to be initiated simultaneously over a single HTTP/2 connection.
In HTTP/1.x, HTTP request and responses are composed of three parts: status line, request/response header and message body. As the WEB feature becomes more and more complex, the number of requests generated by each page is also increasing. Each request must carry UA, Cookies and other content, all of which consume a lot of transmission resources. As shown in the figure below, HTTP 2.0 compresses the size of the header with the compression ratio reaching 71% (from 425 bytes to 122 bytes), avoiding duplicate transmissions and greatly reducing the latency.
HTTP/2 allows the prioritization of requests, letting more important requests complete more quickly. After connection sharing, priority and request dependency mechanisms are needed to solve the problem of critical requests being congested. Each request in HTTP/2 has been configured with prioritization and dependency, and the CPU, memory and bandwidth will be efficiently allocated based on the stream priority to avoid congestion. The stream with high priority is preferentially processed and returned to the client by the server. Both priority and dependency are dynamically adjustable.
After user’s browser establishes connection with a server, the server will proactively push some resources to the browser and cache them. In this way, when requested by the browser, these resources will be retrieved from the cache instead of being pulled from the server, greatly improving the overall speed. Server-side push reduces the congestion time caused by the number limit of concurrent connections on the same domain name; reduces the time of the browser finding the third-party resources from the HTML; reduces the time that it takes for a request to be received by the server after being initiated by the browser.
With CDNetworks HTTP/2, customers can enjoy the following benefits: