I have read an article about data packet and data packet Separation not long ago, and I feel deeply inspired. The datagram distribution protocol for UDP protocol. I have a deeper understanding. So here we will summarize and share this with you. Compared with the TCP protocol, another difference between the UDP protocol is how to receive multiple burst data packets. Unlike TCP, UDP does not guarantee the order in which data is sent and received. For example, an application on a client sends the following four data packets to the server:
D1
D22
D333
D4444
However, UDP may submit the received data to the application on the server in the following order:
D333
D1
D4444
D22
In fact, this out-of-order nature of UDP is rarely seen. Generally, it can only happen when the network is very crowded.
Application of UDP protocol
Some readers may ask, since UDP is an unreliable network protocol, what is the value or necessity? In fact, in some cases, UDP may become very useful. Because UDP has a speed advantage beyond the reach of TCP. Although various security protection functions are embedded in the TCP protocol, a large amount of system overhead will be occupied during actual execution, and the speed will undoubtedly be seriously affected. In contrast, UDP eliminates the information reliable transfer mechanism and transfers security and sorting functions to upper-layer applications, greatly reducing the execution time and ensuring the speed.
The earliest specification for UDP protocol was RFC768, which was released in 1980. Although it has been a long time, UDP continues to play a role in mainstream applications. Many applications, including video teleconference systems, prove the value of UDP. Compared with reliability, these applications focus more on actual performance. Therefore, in order to achieve better performance, for example, higher image frame refresh rate, certain reliability such as meeting quality can be sacrificed ). This is the trade-off between UDP and TCP. Based on different environments and features, the two transmission protocols will play a more important role in the future online world.