The User Datagram Protocol (UDP) is one of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer applications can send messages, sometimes known as datagrams, to other hosts on an Internet Protocol (IP) network without requiring prior communications to set up special transmission channels or data paths.
User Datagram Protocol is a process-to-process protocol that adds only port addresses and checksum error control. It provides the mechanism (like TCP) by which the datagram can be delivered to the destination process within the destination system. UDP uses a simple transmission model without implicit hand-shaking dialogues for guaranteeing reliability, ordering, or data integrity. Thus, UDP provides an unreliable service and datagrams may arrive out of order, appear duplicated, or go missing without notice.
UDP assumes that error checking and correction is either not necessary or performed in the application, avoiding the overhead of such processing at the network interface level.
UDP provides process-to-process communication instead of host-to-host communication.
UDP is a connectionless, unreliable transport protocol. Establishing a connection with the destination process is fast, and if reliability is not an important criteria then the transfer of data is faster for bulk transfer.
This is because reliability requires, implementing the acknowledgements, resending the lost or corrupted datagrams and many more overheads. This definitely decreases rate at which datagrams can be sent. Some of the application as in the case of multimedia, which requires bulk transfer of data, needs no fool-proof reliability.
Multimedia applications, such as VoIP (Voice over IP - using which one can even talk to another person, who has telephone, by making the telephone call through this protocol), and Video conferencing applications uses a protocol known as RTP (Real Time Protocol) for data transfer at the application layer. This RTP protocol uses the services of UDP. If it uses the services of TCP, which provides the reliability, connection oriented and stream service, the quality of the service suffers!
- UDP is suitable for a process that requires simple request – response communication and with little concern for flow and error control. It is not usually used for a process that needs to send bulk data needing error and flow control, such as FTP.
- UDP is suitable for a process with internal flow and error-control mechanisms. For example,the Trivial File Transfer Protocol (TFTP) process includes flow and error control. It can easily use UDP.
- UDP is suitable transport protocol for transport protocol for multicasting and broadcasting. Multicasting and broadcasting capabilities are embedded in the UDP software but not in the TCP software.
- UDP is used for management processes such as SNMP.
- UDP is used for some route updating protocols such as Routing Information protocol (RIP)
- No connection establishment. TCP uses a three-way handshake before it starts to transfer data. UDP just blasts away without any formal preliminaries. Thus UDP does not introduce any delay to establish a connection. This is probably the principle reason why DNS runs over UDP rather than TCP -- DNS would be much slower if it ran over TCP. HTTP uses TCP rather than UDP, since reliability is critical for Web pages with text. The TCP connection establishment delay in HTTP is an important contributor to the "world wide wait".
- No connection state. TCP maintains connection state in the end systems. This connection state includes receive and send buffers, congestion control parameters, and sequence and acknowledgment number parameters. UDP, on the other hand, does not maintain connection state and does not track any of these parameters. For this reason, a server devoted to a particular application can typically support many more active clients when the application runs over UDP rather than TCP.
- Small segment header overhead. The TCP segment has 20 bytes of header overhead in every segment, whereas UDP only has 8 bytes of overhead.
- Unregulated send rate. TCP has a congestion control mechanism that throttles the sender when one or more links between sender and receiver becomes excessively congested. This throttling can have a severe impact on real-time applications, which can tolerate some packet loss but require a minimum send rate. On the other hand, the speed at which UDP sends data is only constrained by the rate at which the application generates data, the capabilities of the source (CPU, clock rate, etc.) and the access bandwidth to the Internet. We should keep in mind, however, that the receiving host does not necessarily receive all the data - when the network is congested, a significant fraction of the UDP-transmitted data could be lost due to router buffer overflow. Thus, the receive rate is limited by network congestion even if the sending rate is not constrained.

References: Wikipedia - User Datagram Protocol
Courtesy - TechnoFreak











