How is HTTP communication supporting the web evolving?



HTTP is an abbreviation for Hypertext Transfer Protocol and is used for communication with servers when browsing websites. When Cloudflare is compatible with the new HTTP version '

HTTP / 3 ', the blog summarizes how HTTP / 3's existing problems have been solved in HTTP / 3.

HTTP / 3: the past, the present, and the future
https://blog.cloudflare.com/http3-the-past-present-and-future/

The world's first web page appeared at the end of 1990, and the first specification of HTTP was written in 1991 the following year. This was called HTTP / 0.9, and it was as simple as downloading a specific document from the server.

In 1996, HTTP / 1.0, which greatly updated functions such as support for uploading, was formulated, and this is the prototype of today's HTTP communication. In HTTP / 1.0, every request has a specification to create a new TCP connection, so delay due to handshake has become a problem. The figure below shows HTTP communication using TLS and TCP . You can see that it is necessary to perform a handshake between TCP and TLS before performing HTTP communication at the bottom.



In order to solve this problem, HTTP / 1.1 with revisions has been formulated six months after HTTP / 1.0. In HTTP / 1.1, “

keep-alive ” was introduced, and multiple requests can be processed with one connection. HTTP / 1.1 has been supporting web communications for a very long time, and the next version, HTTP / 2, was officially specified in 2015, but even after HTTP / 2 was formulated, HTTP / 1.1 There are many sites that communicate.

HTTP / 1.1 has been used for more than 20 years since its introduction, but the website has evolved greatly during that time, and the resources necessary to display each site such as images, JavaScript, CSS etc. Compared to the time when HTTP / 1.1 appeared, it has increased significantly. As a result, browsers need to make more connections at the same time to quickly display websites, but HTTP / 1.1 allows only one request at a time. If you want to make multiple requests, there was a restriction that you had to wait for the previous request to complete, so there was no choice but to make multiple HTTP / 1.1 connections to make simultaneous connections. HTTP / 1.1 was characterized by the ability to download multiple resources in a single connection with the introduction of keep-alive, but making multiple HTTP / 1.1 connections means handshaking on each connection. Yes, I returned to the original HTTP / 1.0 state.

HTTP / 2 appeared in 2015, and it is now possible to download multiple resources simultaneously with a single connection.



With the advent of HTTP / 2, it has become possible to use a single TCP connection efficiently, but this time the problem is that this communication is performed over TCP. TCP is a protocol for sending the entire data in the correct order. If a portion of a TCP packet is lost on the network, it will block subsequent packets until it is retransmitted. Due to the fact that requests for different resources are combined into a single TCP connection, if a packet loss occurs for a request for some resource, the request for another resource using the same TCP connection is also interrupted. I will.

Therefore, a new protocol called “

QUIC ” has been developed in HTTP / 3 and will be used instead of TCP. Theoretically, QUIC is good to create as a transport protocol alongside TCP and UDP , but to spread a new transport protocol, effort to renew all current network equipment Because it takes time and time, QUIC is implemented using UDP.

QUIC not only allows multiple requests to flow without blocking, but also shortens the handshake at the start of communication. Previously, TCP and TLS handshake were performed separately, but using QUIC enables connection authentication and encryption to be performed together, reducing the number of communications with the server.



At the time of article creation, HTTP / 3 connection can only be used with Chrome Canary for developers, and the supported servers are very limited, but you can browse the website more comfortably with the future spread It looks like

in Web Service, Posted by log1d_ts