Is HTTP/3 already in use? No more TCP?
As we know, we have been using http for a long time now since the beginning of Internet. HTTP has gone through many versions since its launch in 1996 with HTTP 1.0. Soon after that in 1997, HTTP/1.1 was released. But after that it took 8 years to launch HTTP/2 which solved some of the issues in HTTP in 2005. And now, HTTP/3 is being released. RFP 9114 for HTTP/3 https://datatracker.ietf.org/doc/rfc9114/ has been released on June 2022.
HTTP/2 had solved some of the key problems in HTTP 1.1 which was blocking us from scaling the communication between client and server. One of the main advantage that it gave was giving us the option to use Multiplexing and Bidirectional communication between client and server (gRPC leverages this). Lot of the applications and frameworks then started leveraging HTTP/2 features. But the underlying protocol of HTTP/2 is still TCP.
As many of you are aware, the inherent property of TCP is to make sure all the data packets are delivered without loosing any of them. This property was both good and bad. It was good, because we are sure that there will not be any packet lose, its bad because it has to wait till all the packets are collected and then it delivers. Internally it was using something called Streams. HTTP/1.1 was only using 1 Stream which had a limitation in total size. No matter how big the data you transfer through TCP, it has to restrict them to the size of the Stream and send it to the target system. HTTP/2 enhanced this to have parallel Streams which is what gave the bidirectional communication and faster transmission of data. But since it was using TCP as the underlying protocol for packet transfer, it has to wait till all the packets are in place. If one of the packet is corrupted, it has to wait for re-transmission and then, once collected will deliver the packets. This was bottleneck for us in terms of scaling of data transmission in this era of ever growing data.
At the same time, google was experimenting a new protocol called "QUIC" which was using UDP as the underlying protocol instead of TCP. Yes, you heard it right, UDP was used instead of TCP. UDP is supposed to be an unreliable protocol which does not guarantee the packet delivery etc. So how can we use UDP for a reliable transmission? This is were QUIC protocol comes into play. QUIC is built on top of UDP to give the capabilities of reliable transmission of packets. Since UDP is kind of stateless in terms of packet handling, it doesn't wait for the packets, but just transmits the packets as soon as it gets. Hence its much faster than TCP. Google has also gone one step forward in experimenting this in Internet scale for some of their products.
领英推荐
This was taken up by IETF with a formation of QUIC Working Group. UDP with QUIC was then further refined make it a formal standard to solve the underlying problem in TCP. It was then termed as HTTP /3. So now with HTTP/3 we will no more use TCP, but instead use UDP as the underlying protocol. Although it was good change, its impossible to change all the hardware networking components to use this new protocol since they are already coded for TCP based communication. These networking components like routers and switches intercept data coming as plain text, but if its encrypted with TLS, they don't intercept them and just let them go. This gave an option to enable usage of UDP/QUIC on these devices if the packets are encrypted. This is where HTTP/3 started enforcing TLS for all communication to handle the transmission across all network devices without any hindrance. This formed the basis to the introduction of yet another version of TLS TLS 1.3. With this, HTTP/3 can still be used with existing devices since they don't try to intercept the packets as the packets are encrypted.
Now, coming to the question of are we using HTTP/3 already? Yes, some of the companies are already using HTTP/3. Especially, with HTTP/3 we can transmit data much faster even on low bandwidth, since the underlying protocol is UDP. This will benefit all locations which are having low bandwidth. To see if any site is using HTTP/3 you can visit this website https://geekflare.com/tools/http3-test and type the URL of the target website. Most of the widely used browsers like Chrome, Safari, Edge and Firefox have added support for HTTP/3 now.
It is very interesting to see how the whole web ecosystem is changing so rapidly to catchup with the growing amount of data processing and transmission which is the need of the hour. Libraries and frameworks are still being developed to support HTTP/3. It will be an important space to follow to enhance the communication between servers and clients and to communicate much faster in future.