当前位置:网站首页>QUIC or TCP

QUIC or TCP

2022-06-23 03:00:00 Jing Teng

QUIC Birth process

QUIC agreement , The full name is quick udp internet connection, By the first Google Design implementation , And in 2013 Released in , The purpose is to solve TCP Protocol in congestion control 、 Multiplexing and other scenarios , And applied to Google On multiple services .

2018 year 10 month ,IETF Formal will be based on QUIC Of http The protocol is named HTTP/3, bring QUIC It has the conditions for global popularity .

stay 2021 year 5 month IETF published RFC9000, Officially launched QUIC Standardized version specification . So far the future has come .

gQUIC and iQUIC

from Google Originally designed and released QUIC, Generally known as gQUIC, Later by IETF released QUIC, It's called iQUIC. Although both names are QUIC But the underlying implementation is quite different .iQUIC Compared with gQuic The protocol is further optimized and improved , According to the Google To release information to the public by oneself becomes ,iQUIC be applied to Google Search and YouTube There are better effects on playing .

At present, it is commonly used gQUIC Version has Q39、Q43、Q46、Q50;

More commonly used iQUIC Version has h3-27、h3-29 and h3 v1.

QUIC Problem solved

1. Rapid connection establishment

Support 0RTT Quickly build a company , avoid TCP and TLS There must be at least two RTT Connection delay caused by handshake , Accelerate the establishment of the company , Reduce time .

For live 、 Short videos and other scenes that attach great importance to the first screen experience , The first frame time can be greatly optimized , Enhance user experience .

2. TCP The problem of head blocking

be based on TCP Of HTTP/2 There is still a head to head blocking problem , In case of packet loss, retransmission , It will block the subsequent message sending .QUIC No longer dependent on TCP Message serial number of , Use UDP Message communication , The loss of the queue header message does not affect the subsequent message transmission .

3. Connection migration problem

QUIC Really get rid of TCP Quintuples , It has incomparable advantages in the era of mobile Internet . For automatic connection wifi, Access elevator 4/5G The Internet and wifi Switch ,wifi When the network is weak, the operator will be automatically switched to optimize the experience , There is no need to shake hands again , You can use your unique connection ID to continue communication . It is very convenient for the continuous experience of the anchor or audience in the mobile scene .

In addition to solving TCP Beyond the inherent problems of ,QUIC In multiplexing 、 The protocol stack optimization and other scenarios have also been effectively optimized , It also has significant advantages for applications in weak network scenarios .

QUIC Experience

Many browsers and open source clients can support QUIC Protocol communication , Most of the latest browsers, such as chrome、firefox、Opera、Safari、 Use chrome Kernel QQ Browsers and so on support QUIC agreement , Open source clients such as quic_client,lsquic,nginx-quic All support QUIC agreement .

But of all the tools ,chrome It is undoubtedly the most convenient , Support for very sophisticated tools . The following is simple chrome Use QUIC How to experience .

Default chrome It's supporting QUIC Of , For the sake of insurance , It can be forced to open manually Chrome Of QUIC switch , stay Chrome Browser address bar input chrome://flags/#enable-quic, Set the switch to Enabled, And restart Chrome browser .

Use chrome Access support quic The website of the agreement , And open the developer tools , Check out the Protocol.

The new version of the Chrome At present, by default IETF QUIC, If you want to test Google QUIC agreement , You can use the command line tool to open Chrome And designate QUIC edition , for example : Get into Chrome The installation directory , perform chrome --enable-quic --quic-version=QUIC_VERSION_43.

--quic-version Later versions can specify gQUIC edition ( Such as QUIC_VERSION_43), You can also specify iQUIC edition ( Such as h3-27).

Tencent cloud live support QUIC Streaming and playing

From the official website of Tencent cloud live broadcast , You can see that Tencent cloud live broadcast has supported QUIC Streaming of , also gQUIC and iQUIC Can support , After being opened in the specified way, you can support , Better experience in weak network scenarios .

Reference documents :

[1] wikipedia quic: https://zh.wikipedia.org/wiki/QUIC#cite_note-:1-13

[2] RFC9000: https://datatracker.ietf.org/doc/html/rfc9000

[3] chromimu log: https://blog.chromium.org/2020/10/chrome-is-deploying-http3-and-ietf-quic.html

[4] Tencent cloud QUIC Protocol live broadcast : https://cloud.tencent.com/document/product/267/52522

原网站

版权声明
本文为[Jing Teng]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/01/202201260034181638.html