Why Do Applications Use the UDP Protocol?
By Peter Thomas
The TCP/IP Internet protocol supports two types of packets -- TCP and UDP. The Transmission Control Protocol is used when there must be a guarantee and a response that the information has been successfully received. TCP ensures that if there is an issue, the packet will be resent over the network. The User Datagram Protocol is a "lightweight" and faster option than TCP. UDP packets arrive more quickly and are processed faster because they don't require verification of receipt. Many applications make extensive use of UDP because of its lack of overhead and more efficient use of bandwidth.
Streaming video applications often use UDP. The human eye is capable of registering approximately 30 frames per second. This means that individual images move very quickly and minor errors usually aren't noticed. UDP will simply start sending the information that allows your video to start playing. If TCP were used, valuable bandwidth would be tied up retransmitting packets that did not come perfectly and, by the time they arrived, they would be outdated.
Because games are real-time applications, information has to be transmitted with extreme time sensitivity. In a multi-player setting over a network, for example, player movements and weapon fire must be taken into account. Invalid information will often be corrected in future messages and retransmission is typically unnecessary because data is quickly invalidated. In addition to this, bandwidth is essential in a multi-player game because a slowdown can easily result in a single player lagging behind, rendering the game too difficult to play.
Domain Name Server Lookups
Domain Name Server (DNS) queries is a basic request followed by a simple reply. DNS servers are queried when a computer is trying to retrieve a piece of requested information and the process is paused until the DNS query completes. The complexity of TCP means the request would likely be served more slowly, resulting in negative performance. If a DNS query is not replied to quickly enough, another can simply be sent, as large numbers of ordered packets do not have to be transmitted.
Peter Thomas has been a technical writer since 2001. He also works as a computer-programming consultant who specializes in conveying abstract information-technology concepts to non-technical workers. Thomas is a former site manager and reporter for the Warcry Network. He received his Bachelor of Science in computer science from the University of Connecticut.