With the rapid development of network technology, speed is no longer the bottleneck of transmission, UDP protocol with its simple, fast transmission advantage, in more and more scenarios to replace TCP, such as Web browsing, streaming media, real-time games, the internet of things.
1. Improve the network speed to provide reliable support for UDP stability
CDN Service Provider Akamai (Nasdaq:akam) reported 7 years from 2008 to 2015, the average rate of each country's network increased from 1.5Mbps to 5.1Mbps, the speed increased nearly 4 times times. Network environment becomes good, network transmission delay, stability also improved, UDP packet loss rate is less than 5%, if re-transmission using the application layer, can fully ensure the reliability of transmission.
2. Compare test results UDP performance is better than TCP
To improve browsing speed, Google proposed the Spdy protocol and HTTP/2 based on TCP. Google is experimenting with the UDP-based QUIC protocol on Chrome, which reduces the transfer rate to less than 100ms.
Google's use of Quic after the connection rate can effectively increase 75%.
Google search boosted page load performance by 3% after Quic.
YouTube has reduced its re-buffering count by 30% after Quic.
3.TCP design is too redundant, speed is difficult to further improve
In order to realize the reliability of network communication, TCP uses the complicated congestion control algorithm, and establishes the tedious handshake process and retransmission strategy. Because TCP is built into the system protocol stack, it is extremely difficult to improve it.
With its simplicity and fast transmission, the 4.UDP protocol replaces TCP4.1 web browsing in more and more scenarios.
There are three advantages of using the UDP protocol:
- Be able to streamline the handshake process, reduce the number of network traffic round trip;
- Be able to optimize the TLS encryption and decryption process;
- Fast and easy to send and receive without blocking.
4.2 Streaming Media
TCP, in the event of a packet loss, TCP will cache the subsequent packets, and so on before the packet is re-transmitted and received before continuing to send, the delay will become larger. UDP-based protocols such as WEBRTC are an excellent choice.
In 2010, Google acquired the WEBRTC (Web-based real-time communication, web real-time communication) technology by acquiring Global IP Solutions to improve the video rate of Web pages.
4.3 Live games
In the case of strict real-time requirements, the use of a custom reliable UDP protocol, such as Enet, Raknet (Users have Sony online game, Minecraft), and so on, the custom retransmission strategy, to minimize the latency of packet loss, Minimize the impact of network problems on gameplay.
Using UDP classic games such as FPS Games quake, CS, the famous game engine Unity3d is also raknet.
4.4 Internet of Things
In 2014, Google's Nest established thread Group, which introduced the Internet of Things communication protocol thread to improve IoT communication.
There are 3 key points to using UDP:
- The demand of network bandwidth is small, and the real-time requirement is high;
- Most applications do not need to maintain connectivity;
- Requires low power consumption.
Summary
Today nearly 50% people around the world are using the Internet, people are constantly pursuing faster, better services, everything is changing, in a growing number of areas, UDP will preempt TCP dominance.
Why UDP is sometimes more advantageous than TCP