User Datagram Protocol (UDP)

UDP is a light-weight, connection-less protocol. Both sides sender and receiver are independent from each other and don’t have to keep track of the transmission state between each other. This gives each side control over when to send data.

The UDP header is smaller than the TCP header. 8 Bytes vs 20 Bytes. It only contains primitive error checking using a 16bit checksum. If datagram are corrupted, they are either discarded or only marked as bad. There is no mechanism for re transmission and no mechanism for detecting dropped packets. Every packet is only sent once.

Since UDP has no way of adjusting to congestion on the network, sending UDP datagrams over a congested network may lead to dropped packets. The receiver will not notice.

../../_images/udp_dropped.png

UDP does also not guarantee the order of datagrams. Due to network congestion, an earlier datagram might arrive later than the last datagram.

../../_images/udp_order.png