UDP is a connectionless, lightweight transport‑layer protocol (Layer 4) that delivers datagrams with minimal overhead. It sacrifices reliability for speed and simplicity—there’s no handshake, no sequencing, and no built‑in retransmission.


Key Characteristics


When to Use UDP


Advantages & Disadvantages

Advantages Disadvantages
Speed: No connection setup → lower latency. No delivery guarantee: Packets may be lost or arrive out‑of‑order.
Low overhead: 8 byte header; minimal processing. No congestion control: Can contribute to network congestion.
Application‑controlled reliability: Apps implement their own checks if needed. No flow control: Receiver can be overwhelmed by sender.
Supports broadcast & multicast No built‑in security: Data unauthenticated unless added above.

UDP Header Fields

image.png

Each UDP datagram carries an 8 byte header plus data: