UDP Application Scope

Source: Internet
Author: User

We know that UDP is an unreliable protocol. However, this protocol is used in many places. Then we will explain the content of the UDP Protocol application in detail. Let's take a look at some of its application scope and how it makes up for its defects.

UDP application scenarios and services

The services provided by UDP are unreliable and connectionless. UDP is suitable for situations where no response is required and only a small amount of data is transmitted at a time. Because the UDP protocol does not need to establish a logical connection during data transmission and does not check the datagram, UDP has good real-time performance and high efficiency. In some cases, network applications of many customer/Server models, including video teleconference systems, must use UDP protocol.

Several features of UDP protocol

1) UDP is a connectionless protocol. The source end of data transmission does not establish a connection with the terminal. when it wants to transmit data, it simply crawls data from the application, and throw it to the network as quickly as possible. At the sending end, the speed of UDP data transmission is limited only by the speed at which the application generates data, the ability of the computer, and the transmission bandwidth. at the receiving end, UDP puts each message segment in the queue, the application reads a message segment from the queue each time.

2) since no connection is established for data transmission, you do not need to maintain the connection status, including the sending and receiving status. Therefore, a server can transmit the same message to multiple clients at the same time.

3) The title of the UDP information package is very short, with only 8 bytes. The additional overhead of the 20 bytes information package of TCP is very small.

4) throughput is not adjusted by the congestion control algorithm. It is only limited by the data generation rate, transmission bandwidth, source end and terminal host performance of the application software.

Although UDP is an unreliable protocol, it is an ideal protocol for information delivery. For example, report the stock market on the screen, and display aviation information on the screen. UDP is also used to modify the route table in the routing Information Protocol RIPRouting Information Protocol. In these applications, if a message is lost, another new message will be replaced in a few seconds. UDP is used in multimedia. For example, RealAudio software developed by Progressive Networks is a software that transfers pre-recorded or live music to the client in real time over the Internet, the RealAudio audio-on-demand protocol used by the software is the protocol running on UDP, and most Internet telephone software products also run on UDP.

UDP protocol Application

UDP is an unreliable network protocol. What is the value or necessity of UDP? 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 UDP protocol applications pay more attention to actual performance, so in order to achieve better use effect, for example, a higher frame refresh rate, a certain degree of reliability can be sacrificed, for example, meeting quality ). 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.

Difference between UDP protocol and TCP protocol

The Chinese name of the TCP protocol is the transmission control protocol. The Chinese name of the UDP protocol is the User Datagram Protocol.

TCP is a very important protocol in the development of the Internet. When using TCP as the underlying protocol, it can ensure that the data you send arrives at the destination in a certain time series, in addition, the destination verifies the integrity and correctness of the data based on the control data of the TCP protocol. At the same time, when the network traffic is congested, TCP can control the data traffic to prevent packet loss. You need to know that the TCP protocol is a very rigorous protocol. It can ensure that data is securely transmitted over poor media networks such as wifi and grps connections.

However, the rigor of the TCP protocol also brings about a problem. Due to the strict requirements on data integrity and correctness, the TCP protocol has to add a lot of control content to the Protocol itself. These controls can be used to check the time sequence, integrity, and correctness of data packets. The addition of the data increases the computing workload of the sender and receiver, and the addition of the control data increases the volume of transmitted data. Increased the load on the network. These problems finally point to a fatal problem: the data delay has increased.

For online games, video chats, and voice chats, users have high requirements on real-time data, but have lower requirements on completely correct data. For example, when chatting, if some packets are lost or incorrect, you may get some unclear voices without affecting the chat experience .) UDP is born under this demand.

Therefore, to sum up, UDP is widely used in scenarios where network data transmission is highly real-time and data accuracy is not very demanding. The high-speed improvement (optical fiber) of physical media transmitted over the network also reduces the probability of packet loss. When the network status is good, the two shortcomings of UDP can be overcome to a large extent. Therefore, UDP is now widely used in many UDP protocol applications.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.