Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the reason why UDP sometimes has more advantages than TCP?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

In this article, the editor introduces in detail the reason why UDP sometimes has more advantages than TCP. The content is detailed, the steps are clear, and the details are handled properly. I hope that this article, "what is the reason why UDP sometimes has more advantages than TCP?" can help you solve your doubts.

1. The improvement of network speed provides reliable network guarantee for the stability of UDP.

CDN service provider Akamai (NASDAQ: AKAM) reports that the average network speed in each country has increased from 1.5Mbps to 5.1Mbps in the seven years from 2008 to 2015, a nearly fourfold increase in network speed. With the improvement of the network environment, the delay and stability of network transmission are also improved, and the packet loss rate of UDP is less than 5%. If application layer retransmission is used, the reliability of transmission can be fully ensured.

2. Comparing the test results, the performance of UDP is better than that of TCP.

In order to improve the browsing speed, Google proposed SPDY protocol and HTTP/2 based on TCP. Google experimented with QUIC protocol based on UDP on Chrome, and the transmission rate was reduced to less than 100ms.

When QUIC is adopted in Google, the connection rate can be effectively increased by 75%. The page loading performance of Google search is improved by 3% after using QUIC. The number of rebuffers for YouTube has been reduced by 30 per cent after adopting QUIC. 3. TCP design is so redundant that it is difficult to further improve the speed.

In order to achieve the reliability of network communication, TCP uses complex congestion control algorithms and establishes a tedious handshake process and retransmission strategy. Because TCP is built into the system protocol stack, it is extremely difficult to improve it.

4. UDP protocol replaces TCP in more and more scenarios because of its simplicity and fast transmission.

4.1 Web browsing

Using the UDP protocol has three advantages:

Can simplify the handshake process, reduce the number of network communication round-trip; can optimize the TLS encryption and decryption process; send and receive fast, non-blocking.

4.2 streaming media

With TCP, in case of packet loss, TCP will cache the subsequent packets and wait for the previous packets to be retransmitted and received before they are sent again. The delay will become larger and larger. UDP-based protocols such as WebRTC are an excellent choice.

In 2010, google acquired WebRTC (Web Real-time Communication, Web Real-Time Communication) technology through the acquisition of Global IP Solutions, which is used to improve the video rate of web pages.

4.3 Real-time games

In the case of strict real-time requirements, the use of custom reliable UDP protocols, such as Enet, RakNet (users have sony online game, minecraft), and self-defined retransmission strategy can minimize the delay caused by packet loss and minimize the impact of network problems on gameplay. Classic games using UDP, such as FPS games Quake and CS, and the famous game engine Unity3D also use RakNet.

4.4 Internet of things

In 2014, Nest under google established Thread Group and launched the Internet of things communication protocol Thread to improve the Internet of things communication.

There are three key points for adopting UDP:

Network bandwidth requirements are small, but real-time requirements are high; most applications do not need to maintain connectivity; need low power consumption; read this, "what is the reason why UDP sometimes has more advantages than TCP" article has been introduced, want to master the knowledge of this article also need to be hands-on and used in order to understand, if you want to know more related articles, welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report