UDP
UDP, or User Datagram Protocol, is a fast, connectionless, and less reliable transport layer protocol for sending data packets (datagrams) over a network. Unlike TCP, UDP does not require a handshake or guarantee packet delivery, order, or error correction, making it ideal for real-time applications like online gaming, video streaming, and voice calls where speed is more critical than perfect accuracy.
Key characteristics of UDP
Connectionless: UDP does not establish a connection before sending data. It simply sends datagrams without waiting for a response, unlike TCP which uses a three-way handshake to establish a connection first.
Unreliable: It does not guarantee that datagrams will arrive at their destination, nor does it ensure they arrive in the correct order. Some packets may be lost or duplicated.
Fast and low-overhead: Because it lacks the overhead of connection setup, flow control, and error correction found in TCP, UDP is significantly faster and has a simpler protocol design.
Suitable for real-time applications: Its speed makes it ideal for time-sensitive applications where it is better to drop a delayed packet than to wait for it to be retransmitted. Examples include online gaming, live video streaming, and VoIP.
Used by other protocols: UDP is a foundational protocol that sits alongside TCP in the internet protocol suite. It can be used by application layer protocols like DNS for quick lookups.