Graph
UDP

📡UDP

NEW

Also known as: User Datagram Protocol

UDP is a connectionless transport protocol enabling low-overhead, best-effort delivery of datagrams without guarantee of reliability, ordering, or congestion control.

DESCRIPTION

User Datagram Protocol (UDP) offers minimal transport services for applications prioritizing low latency over reliability. It sends independent datagrams without establishing connections or ensuring delivery, ordering, or flow control. Common uses include DNS, real-time media (RTP), and custom protocols that implement reliability as needed. Its simplicity reduces overhead and latency, but requires careful handling of loss, reordering, and congestion to be network-friendly. Security and NAT traversal often rely on additional mechanisms.

ALTERNATIVE DEFINITIONS

IETF RFC 768

This User Datagram Protocol (UDP) provides a procedure for application programs to send messages to other programs with a minimum of protocol mechanism.

Defines UDP by its minimal mechanism and purpose for application messaging.

Source

Wikipedia

The User Datagram Protocol (UDP) is one of the core members of the Internet protocol suite. It allows applications to send messages, in this case referred to as datagrams, to other hosts on an Internet Protocol (IP) network.

Describes UDP’s role in the Internet protocol suite and datagram model.

Source

IP Datagram ICMP QUIC RTP DNS Reliability Delays Packet Loss

COMPETING TERMS

TCP

KNOWLEDGE AREAS

Infrastructure Real-time & Streaming Data Data Integration & Interoperability Software Engineering

TARGET AUDIENCE

Software Developer DevOps Engineer Cloud Architect Data Engineer

EXTERNAL SOURCES

TOP QUESTIONS

When should I use UDP over TCP?

Use UDP for latency-sensitive applications (e.g., real-time media, DNS) or custom protocols that handle reliability at the application layer.

Category: Opinion

What are the risks of using UDP?

Lack of reliability and ordering can complicate application logic. Without congestion control, naive use risks network harm and poor performance.

Category: Risks

How do I add reliability on top of UDP?

Implement acknowledgments, retransmissions, sequence numbers, and congestion control. Consider existing protocols like QUIC or RTP/RTCP.

Category: Requirements

Does UDP support multicast?

Yes. UDP supports IP multicast, making it suitable for one-to-many streaming and discovery protocols.

Category: Example

How does NAT affect UDP traffic?

NAT mappings may expire quickly; keepalives or hole punching (STUN/TURN/ICE) are often necessary for connectivity.

Category: Example

What is a common misunderstanding about UDP?

That UDP is always faster. Performance depends on loss, path conditions, and application-level handling of reliability and congestion.

Category: Misunderstanding

QUIC builds transport features over UDP to traverse middleboxes while providing reliability and encryption at the application layer.

Category: Topic

How to secure UDP-based applications?

Use DTLS or application-layer encryption, validate inputs, and implement rate limiting to mitigate amplification and flooding attacks.

Category: Best practices

How does UDP handle flow control?

It doesn’t. Applications must implement their own flow and congestion control to be network-friendly.

Category: Requirements