HTTP/2 is a major revision of the HTTP network protocol. Using HTTP/2 can accelerate content delivery and reinforce the security of data transmission. In addition, HTTP/2 enables both clients and servers to achieve high concurrency through a single connection. This topic describes what HTTP/2 is, the benefits of HTTP/2, and how to enable HTTP/2.

Prerequisites

An SSL certificate is configured for the domain name. For more information, see Configure an SSL certificate.
Note
  • If this is the first time you configure an SSL certificate, you must wait until the certificate takes effect before you can enable HTTP/2.
  • If you disable the SSL certificate after you enable HTTP/2, HTTP/2 is automatically disabled.

Background information

HTTP/2, formerly named HTTP/2.0, is the latest version of HTTP. Compared with HTTP/1.1, HTTP/2 supports more features. For example, multiplexing, header compression, request prioritization, and server push are supported. HTTP/2 provides optimized performance and is compatible with HTTP/1.1 semantics. HTTP/2 is supported by all major browsers such as Google Chrome, Internet Explorer 11, Safari, and Mozilla Firefox.

Benefits of HTTP/2:
  • Binary encoding: Unlike the newline delimited plaintext HTTP/1.x protocol, all HTTP/2 communication is split into smaller messages and frames, each of which is encoded in binary format. The binary encoding mechanism makes HTTP/2 more extensible. For example, frames are introduced to transmit data and instructions.
  • Content security: HTTP/2 ensures higher security because it is based on HTTPS. You can use HTTP/2 to prevent performance degradation that occurs when you use only HTTPS.
  • Multiplexing: HTTP/2 enables a client to make multiple parallel requests through one connection and parallel responses can be returned through the same connection. In addition, multiplexing supports stream dependencies. This allows a client to provide further details of prioritized streams to the server by using the same connection. This way, the delivery of important content is prioritized.
  • Header compression: Each HTTP message carries a large number of headers that describe the transferred resource and properties. To reduce the overhead and improve performance, HTTP/2 uses HPACK compression. HTTP/2 requires both the client and server to maintain and update an indexed list of header fields. This list is used as a reference to encode previously transmitted values by transferring index values. This improves the transfer efficiency.

Procedure

  1. Log on to the Alibaba Cloud CDN console.
  2. In the left-side navigation pane, click Domain Names.
  3. On the Domain Names page, find the domain name that you want to manage and click Manage in the Actions column of the domain name.
  4. In the management pane of the domain name, click HTTPS.
  5. In the HTTP/2 section, turn on HTTP/2.
    HTTP/2