Definition

UDP (User Datagram Protocol) is a core transport layer protocol in the TCP/IP suite. It provides a minimal, connectionless communication service with no reliability guarantees, ordering, or flow control mechanisms.

Protocol Characteristics

  • Connectionless: No handshake required before data transmission.
  • Unreliable: No acknowledgment of packet receipt or retransmission.
  • Low overhead: 8-byte header versus TCP’s 20-byte header.
  • No congestion control: Packets may be dropped under heavy traffic.
  • Stateless: Each datagram is processed independently.

UDP Header Structure (8 bytes)

0      7 8     15 16    23 24    31
+--------+--------+--------+--------+
| Source Port     | Destination Port|
+--------+--------+--------+--------+
| Length          | Checksum        |
+--------+--------+--------+--------+
|             Data...              |
+----------------------------------+

Common Applications

  • Real-time services: VoIP (e.g., SIP/RTP), video streaming
  • DNS queries: Fast resolution with single-packet exchanges
  • Online gaming: Latency-critical player position updates
  • IoT/Sensor data: Periodic status reports where loss is tolerable
  • Multicast/broadcast: Efficient one-to-many transmissions

Advantages vs. TCP

FeatureUDPTCP
SpeedFaster (no handshake/ACK)Slower (connection setup)
ReliabilityNone (best-effort delivery)Guaranteed delivery
OrderingNo sequence enforcementStrict byte-stream order
Congestion CtrlNoneAdaptive window scaling

Performance Considerations

  • Packet loss: Tolerable in real-time apps (e.g., missing VoIP packets)
  • Jitter handling: Applications must implement own buffering
  • MTU awareness: Large datagrams may fragment at IP layer
  • Checksum optional: IPv4 allows zero checksum (risk of corrupt data)

You May Also Like

Multi-account security protection, starting with FlashID

Through our fingerprint technology, stay untracked.

Multi-account security protection, starting with FlashID