UDP: Letting the Application Decide What Can Wait
The User Datagram Protocol, or UDP, carries separate messages called datagrams between applications. It doesn’t establish a connection first or arrange reliable, ordered delivery. If a message goes missing, the software using UDP must decide whether to recover it and how.
That choice can be useful. Suppose a game sends an update showing where a player is standing. By the time a lost update could be sent again, a newer position might matter more. The application can choose to move on instead of waiting for old information.
A missing piece of a document presents a different problem. The application needs that piece to reconstruct the file correctly. UDP doesn't prevent software from adding recovery; it simply doesn't supply it itself.
TCP or UDP: Which One Carries Your Data?
What fits into UDP's small header
A header carries information used to handle a message. UDP's header includes source and destination ports, numbered identifiers that help direct communication to the appropriate application. It also has a length field and a checksum.
A checksum is a calculated value that helps detect accidental corruption in transmitted data. That is different from detecting a lost message and sending it again. Saying UDP has no checks misses a feature present in the original protocol specification.
UDP preserves the message-based approach of datagram communication. It doesn't turn a series of messages into a reliably ordered stream of bytes, the units used to represent digital data. The Transmission Control Protocol, or TCP, supplies that stream service, including recovery of missing data while the connection remains viable.
Software above UDP handles loss and congestion
Software using UDP may need to handle lost, repeated or out-of-order messages. It also needs to consider how quickly it sends them.
Congestion control adjusts sending to avoid overwhelming a network path. UDP doesn't provide it automatically. The Internet Engineering Task Force's UDP usage guidelines place that responsibility on the software built above it.
So UDP isn't a guarantee of speed. Sending more data than a path can carry can create loss and delay, regardless of how small the header is.
Security is separate work too. Datagram Transport Layer Security, or DTLS, is one protocol designed to protect datagram communication against eavesdropping and unauthorized changes. Those protections come from the added protocol, not UDP's checksum.
- Keep work, guest and smart-home gear apart with up to 32 VLANs on one small switch.
- Copy any port's traffic to your laptop with port mirroring and see what is on the wire.
- Set it up from a web page instead of learning a command line.
Reliable web traffic can use UDP
HTTP/3, a version of the protocol browsers use to exchange web resources, shows how reliable delivery can be built over UDP.
The HTTP/3 standard builds on QUIC, a transport protocol that runs over UDP and provides reliable streams. The missing-data recovery happens in that higher layer.
The same basic UDP service can therefore carry a time-sensitive update that software elects to skip or data that software insists on recovering. The application and its supporting protocols make that decision.
Datagram Explained: How Data Travels Without a Delivery Promise

TCP: Putting the Missing Bytes Back in Order

Jitter: Why a Fast Connection Can Still Carry a Choppy Call

QUOTE:
"Amateurs hack systems, professionals hack people."
