What is HTTP/3?

Overview

We use HTTP (Hypertext Transfer Protocol) to fetch web objects on the internet. The first version of HTTP, known as HTTP/0.9, was adequate to serve simple web pages back in the day when websites mostly contained text and images. As the internet grew more complex, the HTTP protocol also had to evolve to cater to the more advanced requests. Now, webpages are quite content-heavy with videos, advertisements, and images to create an engaging user experience.

Each new HTTP version is designed to overcome the limitations of the previous version and builds on top of them. Presently, HTTP/2 is still used publicly, but Google realized its limitations, so they worked towards creating a new version of HTTP, known as HTTP/3.

Why do we need HTTP/3?

HTTP/2 was created to overcome the challenges associated with HTTP/1.1, particularly those related to performance. To cater to the tight latency requirement, HTTP/2 introduced multiplexing. As opposed to HTTP/1.1, it makes use of multiple requests per single TCP connection. HTTP/3 solves the issue of delayed response time for subsequent requests to the server as multiple requests are bundled into a single stream by multiplexing. 

As the network requests are sent as streams within one request, the entire stream is slowed down in case of a large packet or a packet that gets lost or corrupted. This issue is known as head-of-line blocking. To address this, HTTP/3 came into invention. It uses the QUIC (Quick UDP Internet Connection) protocol, specifically targeting decreasing latency of response time. 

Let's have a deeper dive into QUIC Protocol:

QUIC Protocol

The single most prominent feature of QUIC protocol is its use of UDP protocol instead of TCP for communication. Compared with TCP, it significantly improves the response time by reducing the connection setup time. Have a look at the illustration below for a better understanding:

TCP handshake is required before sending any request to the server

As the above illustration shows, TCP incurs a significant overhead by first setting up the connection using a 3-way handshake. Once the connection is set up, the requests are sent, and responses are received.

On the contrary, UDP is connectionless, and requests receive a response without having to wait for an acknowledgment:

TCP handshake is required before sending any request to the server

As such, each stream in a UDP packet is treated independently, and the loss or corruption of one does not affect any other request packet. Since UDP is connectionless, it is generally considered less reliable than TCP, but QUIC caters to that by implementing packet retransmission and reordering.

Additionally, TCP has an initial slow start where the network traffic is initially incremented slowly to keep the network bandwidth in check. In case of a packet loss, it exponentially reduces the sending rate. This congestion control has a significant impact on the performance of the internet.

More on HTTP/3

Besides using UDP as the underlying protocol, HTTP/3 introduces new ideas into the basic HTTP protocol as follows:

  • It provides encryption by default using TLS 1.3, while HTTP/2 had the option of using encryption but did not have it as a default setting. This change makes HTTP/3 much more secure as compared to the previous versions.
  • HTTP/2 provides a functionality known as Server Push, where the server can provide related resources to the client without being requested, e.g., an associated picture with a video. HTTP/3 develops on this where server push is still provided. However, the client can disable this feature if they don't want extra resources from the server before requesting them.

HTTP/3 has not been publicly deployed yet, and if it is released, websites will not be compatible with it right away as additional support is needed from browsers and operating systems

Free Resources

Copyright ©2024 Educative, Inc. All rights reserved