UDP is a connectionless protocol Which is not a reliable protocol. it means that it has no guarantee to get its destination. Example of this protocol is that when you are sending a non-registered letter or postcard, you put it in the mailbox. Now you are not aware of the availability of the receiver to receive the letter and chances are good that it will get where it’s supposed to go but there is no guarantee. There is always a possibility of loss in the way. The post office is not responsible for tracking the letter or informing the sender if the letter does not arrive at the final destination. The UDP is working Just like the above example.
UDP provides the basic functions for delivering data segments between the right applications, with very small overhead and data checking. It is recognized as an unreliable protocol because there is no acknowledgment that the data is received at the destination. With User Datagram, there are no transport layer processes that inform the sender of a successful delivery.
While the TCP reliability functions provide more vigorous communication among applications, they also gain extra overhead and possible delays in transmission.
User Datagram Protocol is a best-effort transport protocol. It is a lightweight transport protocol that offers the same data segmentation and reassembly as TCP; but with no TCP reliability and flow control. UDP is a simple protocol that it is usually described in terms of what it does not do compared to TCP.
No Ordered Data Reconstruction – Data is reconstructed in the order of that it is received.
Unreliable Delivery – Any segments lost are not resent in this protocol like TCP.
Connectionless – No session are established with the source and destination.
No Flow Control – Does not inform the sender about the resource availability.
It is a stateless protocol because it does not inform the source and destination about the packets receiving and it does not give any state of the communication session to client and server. If reliability is required when using UDP as the transport protocol, it must be handled by the application.
An application can accept some loss of data during transmission over the network, but delays in transmission are unacceptable. UDP is the choice for these applications because less network overhead is required. It is preferable for streaming live audio, live video, and Voice over IP (VoIP).
UDP header is called datagrams, as shown in the figure. These datagrams are sent as best-effort by the transport layer protocol. UDP has a low overhead of 8 bytes.