UDP
Definition
User Datagram Protocol - faster but less reliable method of sending data over networks, suitable for applications where speed is crucial.
Use Cases
- Riot Games: Real-time multiplayer game traffic (e.g., player movement and state updates) where low latency matters more than perfect delivery. — Game clients send frequent small UDP datagrams to game servers. The game protocol tolerates packet loss by sending continuous updates and using client-side prediction/interpolation rather than waiting for retransmissions. (Lower latency and smoother real-time gameplay compared with relying on retransmission-based delivery for every update.)
- Zoom: Interactive audio/video conferencing where timely delivery is more important than delivering every packet. — Uses UDP for media transport when possible, typically with encryption and NAT traversal techniques. If UDP is blocked on a network, the application may fall back to TCP/TLS, which can increase latency under loss. (Better real-time quality (lower delay and fewer stalls) on networks that allow UDP, improving meeting experience.)
- Cloudflare: Low-latency DNS resolution for end users. — Operates public DNS resolvers (1.1.1.1) that answer standard DNS queries, which commonly use UDP on port 53 for fast request/response exchanges. (Fast DNS responses at global scale, improving perceived web/app responsiveness for users.)
Frequently Asked Questions
- What's the difference between UDP and TCP?
- TCP is connection-oriented and focuses on reliability: it retransmits lost data, delivers bytes in order, and uses congestion control. UDP is connectionless and sends independent packets (datagrams) without guaranteeing delivery, ordering, or retransmission. UDP usually has lower overhead and can be faster for real-time traffic, but the application must handle loss, duplication, or reordering if it matters.
- When should I use UDP?
- Use UDP when low latency is more important than perfect delivery, or when your application can tolerate or correct loss. Common cases include real-time gaming, voice/video (VoIP, conferencing), live streaming, DNS queries, telemetry/metrics, and protocols built on UDP like QUIC (used by HTTP/3). Avoid UDP for data that must arrive reliably and in order (e.g., file transfers, many database connections) unless you add reliability at the application layer.
- How much does UDP cost?
- UDP itself is a free network protocol—there is no licensing cost. In cloud environments, costs come from the infrastructure carrying UDP traffic: data transfer (egress/ingress), load balancers or gateways that handle UDP, NAT usage, and compute resources processing packets. Pricing depends on region, bandwidth, and the specific networking components you use.
Category: networking
Difficulty: intermediate
Related Terms
See Also