Definition
User Datagram Protocol
The User Datagram Protocol (UDP) is a connectionless, lightweight, and unreliable transport protocol. Data sent over UDP may arrive out of order, be duplicated, or be lost entirely.
Ports
UDP uses port numbers to identify the processes on the sender and receiver. Each port number is 16 bits, ranging from 0 to 65535.
Unreliability
UDP provides no guarantees of delivery, ordering, or duplicate protection. The checksum in the UDP header can detect some transmission errors such as bit flips, but recovery is left to the application.
Use-cases
UDP is designed for real-time applications such as VoIP and streaming, and for simple query-response protocols such as DNS. If error handling is desired, it must be implemented at the application layer.