LOGBOOK

HELP

Quiz Entry - updated: 2026.07.14

How does UDP communication differ from TCP in terms of connection and reliability?

UDP sends data immediately with no handshake and only an 8-byte header; it has no sequence numbers, so lost datagrams are not detected or resent and arriving datagrams are passed to the application in whatever order they arrive.

UDP vs TCP header size comparison

* UDP's fixed 8-byte header is a fraction of TCP's 20-60 bytes — the cost of TCP's state and guarantees. *

The gap between the two protocols all traces back to state. TCP is connection-oriented because it keeps state on both ends, namely sequence numbers, what has been acknowledged, and the current window, and that bookkeeping is exactly what lets it detect a missing byte and resend it, or reorder out-of-sequence segments. UDP is connectionless because it keeps no such state: each datagram is independent, so there is nothing tracking which one was lost or what order they should be in. That is why UDP's header is only 8 bytes (no sequence or acknowledgment numbers to carry) and why it can start sending immediately with no handshake. The receiver getting datagrams out of order or with gaps is not a bug, it is the direct, intended consequence of being stateless. If an application needs ordering or guaranteed delivery over UDP, it must build that itself, as QUIC does on top of UDP.

UDP Communication Characteristics:

No Connection Establishment:

  • UDP does not establish a connection before sending data
  • No three-way handshake
  • Data sent immediately

Low Overhead:

  • Small 8-byte header
  • No connection management traffic
  • No acknowledgments or retransmissions

Datagram Handling:

Aspect UDP Behavior
Tracking No sequence numbers
Ordering Data reassembled in order received (may be out of order)
Lost data Not detected or retransmitted
Reordering No mechanism to reorder datagrams

Example Scenario:

Sent:     1, 2, 3, 4, 5, 6
Received: 1, 2, 6, 3, 5    (4 lost, out of order)
Output:   1, 2, 6, 3, 5    (delivered as-is)

Key insight: UDP simply forwards datagrams to the application in whatever order they arrive. Lost datagrams are not resent.

Go deeper:

From Quiz: NETW1 / Transport Layer | Updated: Jul 14, 2026