UDP
UDP (User Datagram Protocol) is a connectionless, unreliable, unordered transport-layer protocol with low overhead and minimal delay, suited to real-time and broadcast traffic.
Purpose
It offers lightweight transport with no connection setup or acknowledgment, fitting real-time audio/video and DNS queries.
Mechanism
Connectionless: datagrams are sent directly with no handshake, no ACKs, and no flow control. The header is 8 bytes (source port, destination port, length, checksum). Reliability is the application's job (QUIC, for example, adds its own). Broadcast and multicast are supported.
Use cases
- DNS queries (port 53)
- Real-time audio/video (WebRTC)
- DHCP discovery
- Low-latency game traffic
Examples
- Input
8-byte header + payloadOutputSent directly, no acknowledgmentLow overhead
Common errors
- UDP's unreliability loses data
- Add application-layer retransmission or use QUIC
Related terms
TCP
TCP (Transmission Control Protocol) is a connection-oriented, reliable, ordered transport-layer protocol, establishing connections with a three-way handshake and providing sliding-window flow control and ACK-based acknowledgment. GLOSSARY
Socket
A socket is a network communication endpoint identified by (protocol, local IP, local port, remote IP, remote port), serving as the interface between the application and transport layers. GLOSSARY
Port
A port is a transport-layer 16-bit address (0-65535) that distinguishes multiple network applications on one host; combined with the IP address it forms a socket. GLOSSARY