• ↑↓ to navigate
  • ↵ to open
  • ⟶ to select
  • ⌘ ⌥ ↵ to open in a panel
  • ←→ to navigate
  • esc to dismiss
⌘ '
keyboard shortcuts

The Problem

Some applications (DNS, VoIP, gaming) need fast, low-latency communication where occasional packet loss is acceptable. TCP’s reliability mechanisms add unacceptable delay and overhead for these use cases.

Core Idea

A connectionless, unreliable transport protocol that sends independent datagrams with minimal overhead, trading reliability for speed.

How It Works

  1. No connection establishment — applications send datagrams immediately
  2. Each UDP segment has source port, destination port, length, and checksum
  3. No guarantees: packets can be lost, duplicated, or arrive out of order
  4. No flow control or congestion control
  5. Applications must handle reliability at the application layer if needed

Visual Explanation

G App Application UDP UDP (No connection, No reliability) App->UDP Data IP IP (Best effort) UDP->IP Datagram + Ports IP->App Receive note Minimal overhead Fast transmission

Key Properties

  • Connectionless: no handshake or state
  • Unreliable: best-effort delivery only
  • Lightweight: 8-byte header vs TCP’s 20+ bytes
  • Supports broadcast and multicast (unlike TCP)

Semantic Network

semantic_UDP THIS Udp REL1 Related Concept THIS--REL1 related REL2 Builds Into THIS--REL2 builds into

Connections

  • Built from: Connectionless Service — implements this service
  • Built from: IP Protocol — runs on top of IP
  • Contrasts with: TCP — unreliable vs reliable transport
  • Related: DNS — uses UDP for fast lookups
  • Related: VoIP — uses UDP for real-time communication

Edge Cases & Gotchas

  • Checksum is optional in IPv4 (unlike TCP which always has it)
  • No backpressure — sender can overwhelm receiver
  • Fragmentation happens at IP layer, not UDP layer