What is UDP?
UDP transports data as independent datagrams. It does not itself provide connection establishment, retransmission or guaranteed ordered delivery. Applications or higher-level protocols add these properties when required.
How datagrams work
The UDP header contains source and destination ports, length and checking information. Message boundaries are preserved, but a datagram can be lost, duplicated or delivered out of order. Omitting TCP's connection setup and acknowledgment mechanisms can reduce overhead in some exchanges. However, UDP is not always faster: packet size, congestion and application loss handling affect the outcome. Large datagrams can cause fragmentation problems. Designs should respect the network's supported packet sizes and control transmission rates. An application must not assume that the protocol will automatically recover a packet it never received.
Examples and security
In live audio, a very late segment may be useless, so a system can compensate for missing data and continue with the current stream. Games may likewise prefer a new position over waiting for an old one. DNS uses UDP where appropriate but is not limited to it. QUIC is an example of a protocol that provides reliability and security over UDP. Not every application using UDP is therefore unreliable. UDP has no built-in encryption, so sensitive information needs protection at a higher layer. Servers require packet-size checks, traffic limits and monitoring of unusual requests. Design decisions must consider both low latency and data integrity.