HTTP2

更新时间:2022-04-11 15:10:10

1 Feature Intro

1.1 Brief Introduction

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.

1.2 Applicable Product Lines

  • Content Acceleration
  • Dynamic Web Acceleration
  • Media Acceleration
  • Media Acceleration Live Broadcast

2 Feature Detail

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.

2.1 Multiplexing

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.

온라인 지원센터 변경 안내

2.2 HTTP Header Compression

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.

2.3 Request Prioritization

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.

온라인 지원센터 변경 안내

2.4 Server Push

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.

3 Key Benefits

With CDNetworks HTTP/2, customers can enjoy the following benefits:

  1. Faster delivery speed in poor network. HTTP/2 outperforms HTTP/1.x in special features mentioned above.
  2. Support negotiating HTTP/2 via ALPN or NPN. CDN PoPs automatically identify H2 requests and respond with HTTP/2, reducing the RTT latency caused by negotiation.
  3. Support HTTP/2 access in both HTTP and HTTPS environments.
本篇文档内容对您是否有帮助?
有帮助
我要反馈
提交成功!非常感谢您的反馈,我们会继续努力做到更好!