Friends who are familiar with the Internet should all know that the next generation of application layer network transmission protocol HTTP3 will have a major change. The transmission protocol of the underlying network layer will change from the current TCP to UDP, and will be based on Google's open source QUIC protocol as the middle layer. We all know that the UDB protocol seems to be an unordered and unreliable protocol, but its transmission efficiency and parallel transmission can greatly improve the transmission performance. Therefore, the reliability of transmission under HTTP3 must be guaranteed by QUIC. QUIC has also gradually become a well-known protocol from the initial experiments to actual use. Google, Facebook, Amazon, Cloudflare, etc. have tried and used it online. In this article, we will learn about Snapchat's QUIC practice.
status quoSnapchat is a photo-sharing application developed by two Stanford students. Users can take photos, record videos, add text descriptions and pictures, and share them with their friends and fans through the Internet. Service performance, especially network performance, is critical. If there is a delay when sharing things, it will have a great impact. According to their analysis: In Snapchat's service process, UI rendering and data disk persistence can be achieved within a few milliseconds, and the bottleneck is the delay on the network, which may take several seconds, and the error rate and hardware device restrictions are very high. In order to reduce network delays and errors, they use conventional practices such as reducing request packets and response packets, reducing unnecessary synchronization, and using global content distribution CDN vendors to accelerate. Of course, they also use new transmission technology, the next generation high-speed UDP Internet network protocol QUIC. Old architectureSnapchatters use a pre-QUIC network stack. Taking sending a Snap as an example, at the application layer, the Snap media is transmitted via an HTTP2 request. TLS is used at the security layer to secure the connection, and TCP is used to split the request into chunks to upload the Snap to the server. However, the TCP+TLS+HTTP2 stack is not ideal for mobile network environments. For example, if a Snapchatter switches between WiFi and WAN, the TCP request will fail. For users chatting with friends, the inability to send messages due to a broken connection will result in a degraded experience. QUIC AdvantagesQUIC is an Internet transport protocol developed by Google engineers. QUIC is the foundation of HTTP3, based on UDP, to replace HTTP2's TCP+TLS+. QUIC solves many transport layer and application layer problems, while requiring almost no changes from application developers. As shown in the figure above, QUIC does not change the network layer network protocol, nor does it require changes to the high-level HTTP protocol. Compared with HTTP2's TCP+TLS+protocol stack, QUIC has made improvements in the following aspects:
EffectSnapchat's client network stack is built on top of the open source mobile network library Cronet. Snap uses Cronet to implement QUIC and also improves service observability through rich metrics and logs, building a unified view of client and server network performance. According to Snapchat's comparison of different protocols in different regions, overall, enabling QUIC improved p90/P99 network latency by 6-20% and reduced network errors by 3%-8%. There are more improvements for low-network connection user groups. Snapchat enabled QUIC on its ad service in October 2019. Significant improvements in P90/P99 latency and error rates were observed. As shown above, the error rates for all error codes have improved, including connection timeout, connection loss, and request timeout. In a further breakdown of latency improvements by country and region, it can be observed that countries and regions with relatively poor network quality and greater geographical distance to the service have higher latency improvements. In the second example, enabling BBR congestion control on the client-to-server path on top of QUIC also resulted in significant latency improvements. There are further improvements with larger request payloads. In the final example, by enabling connection migration on Android, the success rate of network requests when the Wi-Fi connection is lost is improved by 20%. SummarizeSnapchat's QUIC practice has achieved very good results. By using new technologies, it has solved service pain points, improved performance, and greatly improved the user experience. Using small protocols to solve big problems can be used directly or used as a research report to convince leaders to improve the architecture. |
<<: Telecom APIs: A critical IT tool for expanding services and improving customer experience
>>: Kubernetes network technology analysis: Pod communication based on routing mode
Without any warning, the COVID-19 pandemic forced...
CMIVPS is a foreign hosting service provider esta...
On June 8, while the college entrance examination...
On May 18, Lenovo and Intel jointly demonstrated ...
Traditional financial services are no longer the ...
ProfitServer is a foreign hosting company founded...
On February 10, foreign media reported that a rep...
Today we will look at the basic configuration cas...
As the old saying goes, "It's hard to pr...
BuyVM's low-end VPS packages are currently be...
In order to support technological innovation, hel...
Seven-layer model decomposition From the applicat...
introduction: Hello everyone, I am Xiaozaojun. In...
【51CTO.com original article】 Nowadays, our daily ...
In the past two years, broadband has become a mus...