UDP
UDP is the right tool when the problem is datagram-shaped rather than stream-shaped.
That sounds small, but it changes the whole design:
- no connection-oriented stream model
- different performance tradeoffs
- different reliability expectations
When UDP fits
Section titled “When UDP fits”Typical examples include:
- lightweight request/response protocols
- telemetry and metrics transport
- systems where low ceremony matters more than stream semantics
Why this page exists
Section titled “Why this page exists”If the docs only talked about servers in the abstract, users would have to infer transport choices from API reference pages. That is too late.
This page exists to make the transport decision explicit early:
- use TCP for stream-oriented protocols
- use UDP for datagram-oriented ones
That is a meaningful design choice, not a small implementation detail.