Networkinguser datagram protocoldatagram

UDP

Definition

The User Datagram Protocol adds only ports and a checksum on top of IP: each datagram is sent on its own, and it may be lost, duplicated or arrive out of order.

In practice

UDP suits traffic where a late packet is worthless or the application wants its own rules: voice and video calls, online games, DNS queries and metrics. There is no setup round trip and no head-of-line blocking, so one lost packet never stalls the ones behind it. QUIC builds a reliable, encrypted transport on top of UDP in user space.

Everything TCP gives for free becomes the application's job: detecting loss, retrying, ordering, pacing so it does not flood the network, and splitting data to fit the path MTU. Some corporate firewalls block or throttle UDP, so protocols built on it usually keep a TCP fallback.

Example

A video call sends 50 audio datagrams per second; if one is lost, the codec conceals the 20 ms gap instead of waiting for a retransmission that would arrive too late.