89
The User Datagram Protocol (UDP) is one of the core protocols of the Internet and is particularly important where speed is more important than reliability.
This is the User Data Protocol
UDP (User Datagram Protocol) is a minimalist transport protocol that runs directly over IP. It ensures a fast, connectionless transmission of data packets.
- Unlike TCP, UDP does not establish a fixed connection between sender and receiver. Each data packet is sent independently of the previous one.
- UDP also does not provide mechanisms for error detection or for confirming that packets have arrived. Therefore, data can be lost or arrive twice.
- A UDP packet consists of an 8-byte header and the actual user data. This significantly reduces the overhead compared to TCP.
- Since UDP does not guarantee reliable transmission, it is particularly suitable for applications that require fast transmission and can tolerate minor losses.
How UDP works
UDP is designed to be simple and efficient. It dispenses with elaborate control mechanisms and allows you to transfer data in a straightforward way.
- A UDP packet contains four fields in the header: the source port, the destination port, the packet length and an optional checksum. The rest is the user data.
- Senders send UDP packets directly to the destination IP address. However, there is no confirmation as to whether the packet has arrived.
- Although UDP contains an optional checksum for error detection, faulty packets are simply discarded and not resent.
- Due to the lack of mechanisms for connection control and error correction, UDP is significantly more resource-efficient and less complex than TCP.
- Applications such as streaming, real-time communication or online gaming use UDP because minor delays are more important than perfect data transmission.