What is http3? This article gives you a quick understanding of http3 in a simple way.
You don’t even understand http2 when someone starts talking about http3. It’s really infuriating. But there’s also a reason http3 will get attention: it’s fast.
A long time ago
Before we talk about the future, let’s talk about reality.
Do you know HTTP? This protocol, defined in 1991, is used to manage the web. Its full name is hypertext transfer protocol, which allows you to get resources from web pages and transfer web data from web servers to your browser. It’s based on a lower level protocol – TCP, the point here – and it’s stateless. This means that each request is completely independent. Each GIF image displayed on the page exists independently on the Internet, which is good for the GIF images themselves. But for us, such a system is a bit fragmented.
The problem is that each request looks for only one file at a time. Create an expensive TCP connection each time. Imagine what a burden it would be if you had 10000 tips on your page.
I know that many people like the pictures I made in my last article, so in order to better explain the protocol mechanism of the Internet, I will make another picture here.
Although browsers can make six different requests at the same time, HTTP is still slow and requires a lot of TCP connections. In addition, we developers usually don’t care. We like to fill pages with all kinds of rubbish. For example, the huge jQuery library, which contains 300 useless CSS style sheets, ends with a transparent 8-megabyte PNG diagram.
When Google found out that we were dumping rubbish all over the Internet, they started working on something called spdy. What is the purpose? Speed up the Internet, of course.
Spdy is a specification and it is recommended to continue using HTTP, but some rules need to be changed. By compressing headers, prioritizing requests, and multiplexing, it will make all TCP requests and connections a single one!
Specifically, when you read HTML, the browser will see everything you want to ask for on the page. Then, it can get all the content at once, so as to avoid getting one file at a time.
The first draft of http2 was based on spdy. Http2 was quickly adopted, and then everything on the Internet became much faster.Today, 42.7% of content on the Internet uses http2。
2 about http3
Http2 is based on HTTP and changes some rules. So is http3. In other words, after explaining the status quo, I can easily explain what the future looks like.
Google is a geek organization and they will never stop. After spdy evolved into http2, they thought it was still not fast enough. So they started talking about quic. This is the second technology developed by Google that will become an official upgrade of the HTTP protocol. So, what’s special about this agreement?
The main improvement of http3 is in the transport layer. The transport layer won’t have the heavy TCP connections I mentioned earlier. Now, everything goes UDP.
Quic, by the way, means “fast UDP Internet connection.”. This change in the protocol will significantly speed up connection establishment and data transfer. However, while UDP is certainly faster and simpler, it does not have the reliability and error handling capabilities of TCP.
TCP must make multiple round trips to establish a connection in a square and stable manner. UDP doesn’t worry that much, and it does run fast at the cost of stability degradation and packet loss risk. However, UDP can greatly reduce the latency in requests. The latency of repeated connections to the same server is almost zero because there is no round trip required to establish the connection.
Http3 is the multiplexing and compression of http2, and the protocol is changed from TCP to UDP. Then the people at Google added layers to the protocol to ensure stability, packet receiving order, and security.
Therefore, http3 uses UDP to achieve high speed while maintaining quic stability without sacrificing TLS security. Yes, there is tls1.3 in quic, which you can use to initiate elegant SSL. The underlying mechanism of these layers is as follows:
Quic evolved into http3 in 2018. The Internet Engineering Task Force’s group of Internet Protocol makers agreed to the proposal. This is good news, because the Internet is never fast enough for us impatient people.
Http3 represents a glamorous future, and its HTTP infrastructure potential has been maximized by Google’s geeks. At the time of writing, only 4.6% of Internet content is using http3, but that number is likely to grow significantly in the next few years. This article only talks about this aspect knowledge, but if you want to know more, there are many articles on the Internet for your reference.