English

HTTP/2

Posted on May 28, 2024 by
167

What Is HTTP/2?

HTTP/2, originally titled HTTP/2.0, represents the second iteration of the HTTP network protocol utilized across the World Wide Web. Leveraging primarily on the SPDY protocol, HTTP/2 employs several strategies to enhance web performance. These include data compression within HTTP header fields, multiplexing for efficient data transmission, and the integration of server push mechanisms to minimize network latency and expedite webpage loading on client devices. Notably, HTTP/2 preserves the application semantics of HTTP, retaining its request methods, status codes, and header fields. However, it innovates by altering the formatting and transmission of data, while also implementing a binary framing layer to optimize performance.

What Problems Does HTTP/2 Solve?

HTTP, the most widely utilized Internet application protocol, has evolved over time. Earlier iterations were relatively straightforward. HTTP/0.9, for instance, was a concise one-line protocol that kickstarted the World Wide Web. Subsequently, HTTP/1.0 documented popular extensions to HTTP/0.9 in an informal standard, while HTTP/1.1 brought about an official IETF standard. However, the simplicity of implementation in these versions came at the expense of application performance.

For instance, in HTTP/1.1, achieving concurrency and reducing latency requires clients to establish multiple connections. Furthermore, HTTP/1.1 fails to compress header fields of requests and responses, leading to unnecessary network traffic. Additionally, it lacks effective resource prioritization support, leading to suboptimal utilization of the underlying TCP connection.

As network applications continue to expand in scope, complexity, and significance in our daily lives, HTTP/2 was developed to address the limitations of its predecessors. While HTTP/2 retains the application semantics of HTTP and maintains the use of request methods, status codes, and header fields, it primarily focuses on altering the formatting and transmission of data. Moreover, it introduces the server push mechanism to mitigate network latency and enhance webpage loading speed for clients.

What Key Features Does HTTP/2 Have?

Binary Framing

At the heart of all performance enhancements in HTTP/2 lies the novel binary framing layer, depicted in the following illustration. This binary framing layer serves as the bedrock for all other functionalities and performance optimizations introduced by HTTP/2, dictating the encapsulation and transmission of HTTP messages between clients and servers.

What Is HTTP/2? What Problems Does HTTP/2 Solve?

While HTTP/2 maintains the application semantics of HTTP, utilizing the same request methods, status codes, and header fields, it primarily revolutionizes the way data is formatted and transmitted. Unlike the HTTP/1.1 protocol, which relies on newline-delimited plaintext, HTTP/2 segments information into smaller messages and frames, each encoded in binary format. These frames correspond to messages within specific data streams and are multiplexed within a single TCP connection.

Stream Prioritization

Once an HTTP message is divided into individual frames, frames from multiple data streams can be multiplexed. The sequencing and interleaving of frames sent by both clients and servers become pivotal for performance optimization. HTTP/2 introduces the concept of weight and dependency for each data stream, facilitating clear resource prioritization—a crucial aspect for enhancing browsing performance. Additionally, HTTP/2 empowers clients to dynamically update resource priorities, enabling the reallocation of dependencies and weights in response to user interactions and signals, further refining browser optimizations.

Header Compression

Each HTTP request or response carries headers detailing resource attributes. In HTTP/1.1, these message headers are transmitted as plain text, resulting in significant overhead, particularly when using HTTP cookies. HTTP/2 employs the HPACK algorithm to compress header fields, encoding them to reduce their size. Furthermore, both clients and servers maintain indexed lists of previously transferred header fields, allowing efficient retrieval of header field data based on index values.

Multiplexing

Multiplexing enables concurrent transmission of multiple request and response messages over a single HTTP/2 connection. Unlike earlier versions of HTTP, multiplexing facilitates the parallel transfer of multiple streams without necessitating additional TCP connections. In HTTP/2, frames serve as the smallest communication unit, representing messages in logical streams and being bidirectionally interleaved over the same TCP connection.

Built upon the binary framing layer, HTTP/2 empowers clients and servers to transmit requests and responses simultaneously via shared TCP connections. By segmenting HTTP messages into independent frames, interleaving them, and reassembling them based on stream identifiers and headers, multiplexing resolves head-of-line blocking issues and enhances transmission performance.

Server Push

A notable feature of HTTP/2 is server push, enabling servers to preemptively send multiple responses for a single client request. This mechanism allows servers to push resources to clients without explicit requests. For instance, upon a client's request for stream 1, the server may push streams 2 and 4 alongside stream 1, as depicted in the accompanying illustration.

What Is HTTP/2? What Problems Does HTTP/2 Solve?

Server push facilitates data transmission prior to client requests, enhancing efficiency and improving user experience by eliminating redundant transmission steps and accelerating page response times.

Application of HTTP/2 in Network Management and Monitoring

HTTP/2 serves as a primary tool for network management and monitoring purposes. With HTTP/2, devices can promptly capture real-time performance metrics from servers, leading to enhanced efficiency in network resource utilization and reduced latency in network applications.

In the realm of SD-WAN Solutions, the network controller leverages both NETCONF and HTTP/2 to oversee network devices. The comprehensive architecture of the SD-WAN Solution is depicted in the figure below. Employing NETCONF, the network controller gathers operational and maintenance (O&M) data such as network device alarms, logs, and events, while HTTP/2 facilitates the collection of performance data from network devices.

What Is HTTP/2? What Problems Does HTTP/2 Solve?

Furthermore, the network controller utilizes NETCONF to distribute configurations to network devices, with these configurations securely transmitted via SSH. Network devices utilize HTTP/2 to relay performance metrics and NETCONF to report alarms back to the network controller. Bidirectional certificate authentication is mandatory for network devices to register with the network controller and establish online connectivity. Additionally, the transmission of system software and signature databases of network devices occurs over HTTPS. Both HTTPS and HTTP/2 protocol packets are encrypted using the Transport Layer Security (TLS) protocol, ensuring the security of data transmission.

You might be interested in

See profile for undefined.
FS Official
VDC
See profile for undefined.
FS Official
NAT
See profile for undefined.
FS Official
SFC