UDP

Added on April 5, 2026

The User Datagram Protocol (UDP) is another protocol that is used to communicate data between devices.

Unlike its brother TCP, UDP is a stateless protocol that doesn't require a constant connection between the two devices for data to be sent. For example, the Three-way handshake does not occur, nor is there any synchronisation between the two devices.

UDP is used in situations where applications can tolerate data being lost (such as video streaming or voice chat) or in scenarios where an unstable connection is not the end-all.

Advantages of UDP Disadvantages of UDP
UDP is much faster than TCP UDP doesn't care if the data is received or not.
UDP leaves the application (user software) to decide if there is any control over how quickly packets are sent. It is quite flexible to software developers in this sense.
UDP does not reserve a continuous connection on a device as TCP does. This means that unstable connections result in a terrible experience for the user.

As mentioned, no process takes place in setting up a connection between two devices. Meaning that there is no regard for whether or not data is received, and there are no safeguards such as those offered by TCP, such as data integrity.

UDP packets are much simpler than TCP packets and have fewer headers. However, both protocols share some standard headers,.

Header Description
Time to Live (TTL) This field sets an expiry timer for the packet, so it doesn't clog up your network if it never manages to reach a host or escape!
Source Address The IP address of the device that the packet is being sent from, so that data knows where to return to.
Destination Address The device's IP address the packet is being sent to so that data knows where to travel next.
Source Port This value is the port that is opened by the sender to send the UDP packet from. This value is randomly chosen (out of the ports from 0-65535 that aren't already in use at the time).
Destination Port This value is the port number that an application or service is running on the remote host (the one receiving the data); for example, a webserver running on port 80. Unlike the source port, this value is not chosen at random.
Data This header is where data, i.e. bytes of a file that is being transmitted, is stored.