Can two messages stay separate on the way?
01Follow RED and BLUE in separate envelopes, then change what happens on the path.
The app sends RED and BLUE as two separate messages. The labels in this drawing are not UDP sequence-number fields.
Two messages created by the app
Two messages · not one combined stream
What happens if you change this?
Make one change, then watch again. Restart restores the original example.
The surviving datagram remains a message; UDP does not reconstruct the missing one.
Key idea: UDP keeps messages separate. It does not promise that every message arrives once or in the order sent.
Terms
- UDP
- User Datagram Protocol: sends separate messages to numbered endpoints with a small header.
- Datagram
- One separately carried message, rather than an ordered byte stream.
- Port
- A numbered endpoint used to choose where a message goes within a host.
- Payload
- The carried message data, excluding the wrapper being discussed.
- Checksum
- A computed error-check value; it is not proof of identity.
Rules & examples
Keep message boundaries separate from delivery promises.
These reference examples may differ from the selected experiment.
- UDP does not guarantee arrival, ordering, or duplicate protection.
- Applications needing reliable ordered streams require another mechanism.
The drawing is a simplified worked example. Follow the linked RFC and its updates for implementation requirements.
RFC 768 Introduction describes message-oriented, minimal transport without delivery or duplicate guarantees. RFC 8085 gives application usage and congestion guidance. The path outcomes are selected examples, not measured probabilities. A receive buffer that is too small can truncate a message under the host API; message boundaries do not promise that every buffer receives every byte. These experiments use ordinary IPv4 UDP without RFC 9868 options or fragmentation. No packets are sent.
Sources
New to this? Start hereA quick picture + helpful background
A message needs an address.
Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.