Updated on 2024-07-08 GMT+08:00

HTTP/2

Background

HTTP/2 is a next-generation hypertext transfer protocol. It reduces the TCP handshake delay, reduces the packet header transmission volume, and improves transmission efficiency. Addresses starting with http:// can use only the HTTP/1.x protocol, and those starting with https:// support HTTP/2.

Prerequisites

An HTTPS certificate has been configured. For details, see Configuring an HTTPS Certificate.
  • Disabling the HTTPS certificate will disable HTTP/2.
  • After configuring the HTTPS certificate, wait about 5 minutes for the configuration to complete and then enable HTTP/2.

Protocol Advantages

HTTP/1.1 is the current mainstream protocol used on the Internet. HTTP/2 outperforms HTTP/1.1 and keeps the syntax of HTTP/1.1.

HTTP/2 outperforms HTTP/1.1 in the following aspects:

  • Binary framing

    HTTP/2 uses binary format to transfer data, while HTTP/1.1 is a text-based protocol. Binary format is more advantageous in resolving and optimizing the protocol, and it raises the efficiency of data transfer.

  • Header field compression

    HTTP/2 compresses and transfers message headers using HPACK. These headers are traced and stored in a header table. Once a message header has been sent for once, it is cached and can be obtained by other identical message headers automatically.

    Requests using HTTP/1.1 carry a large amount of redundant header information, which causes waste to bandwidth. With header field compression, HTTP/2 saves the bandwidth and traffic.

  • Multiplexing

    HTTP/2 multiplexes multiple requests or responses over a single TCP connection. While HTTP/1.1 establishes a TCP connection for each request or response in order. By sending requests concurrently, HTTP/2 lessens the pressure on server connection and alleviates the network blocking problem.

Procedure

  1. Log in to Huawei Cloud console. Choose Service List > Content Delivery & Edge Computing > Content Delivery Network.

    The CDN console is displayed.

  2. In the navigation pane, choose Domains.
  3. In the domain list, click the target domain name or click Configure in the Operation column.
  4. Click the HTTPS Settings tab.
  5. Switch on HTTP/2.