Skip to content
Riot Docs

Search is only available in production builds. Try building and previewing the site to test it out locally.

Install Riot GitHub

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

Typical examples include:

  • lightweight request/response protocols
  • telemetry and metrics transport
  • systems where low ceremony matters more than stream semantics

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.