UDP Message Boundaries and Delivery Semantics

Use a datagram as one transport unit and identify the reliability and ordering obligations an application may need.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. A send adds one message to the transport interface
  2. Application messages need identifiers when order matters

A send adds one message to the transport interface

UDP carries datagrams. A receiving operation returns a datagram subject to buffer and truncation rules. Successive sends are not delivered as one concatenated byte stream by UDP. The transport does not itself guarantee delivery, uniqueness or ordering. An application sending a time-sensitive observation may choose to skip late observations instead of waiting for every one.

Application messages need identifiers when order matters

If an application requires ordered or acknowledged records, use its chosen protocol and define sequence identity, timeout and duplicates explicitly. Changing datagram sizes also interacts with the path MTU. A transport checksum establishes a limited transmission integrity check. TCP’s byte stream provides ordered delivery with different boundary semantics, while QUIC streams build additional transport behavior over datagrams.[1][2]

References

  1. IETF, RFC 768: User Datagram Protocol ↩
  2. Larry Peterson and Bruce Davie, Computer Networks: A Systems Approach ↩