Version

User Datagram Protocol - UDP

User Datagram Protocol (UDP) Explained

User Datagram Protocol (UDP) is a protocol used for communication on the internet. It is often used for time-sensitive applications like gaming, watching films, or Domain Name System (DNS) lookups. 

How does UDP work?

The UDP process is quite straightforward when compared to other networking protocols. The "datagrams," or data packets, are sent to a designated target computer. The order in which the packets should arrive is not specified anywhere. Additionally, there is no method for verifying that the datagrams reached their intended location.

Even though UDP includes checksums, which are intended to assure the data's integrity, and port numbers, which help distinguish the roles the data plays at the source and destination, the absence of an obligatory handshake poses a challenge. UDP leaves the software the user is running vulnerable to unreliable elements of the underlying network.

As a result, the data may or may not be supplied. Additionally, the order in which it comes is not controlled. Thus, the data may appear glitchy, out of order, or with blank spaces when it reaches its destination.

What Kind Of Services Rely On UDP?

In time-sensitive communications, when occasionally dropping packets is better than waiting, UDP is often used. This protocol is used to send voice and video traffic because they are both time-sensitive and built to withstand some degree of loss. For instance, UDP is used by many internet-based telephone services that use VOIP (voice over IP). This is due to the fact that a phone conversation with static is better than one with crystal-clear but severely delayed audio. Because of this, UDP is the best protocol for online gaming. 

UDP header packet structure

UDP wraps datagrams with a UDP header containing four fields totaling eight bytes.
The fields in a UDP header are:

  1. Source port
  2. Destination port
  3. Length 
  4. Checksum

Benefits and Downsides of UDP

For different kinds of applications, UDP has a lot of advantages, including:

  1. No retransmission delays
    Time-sensitive applications that can't afford retransmission delays due to dropped packets should use UDP. Examples include video streaming, online gaming, and voice-over IP.
  2. Speed
    Because of its speed, UDP is advantageous for query-response protocols like DNS, where small, transactional data packets are used.
  3. Suitable for broadcasts
    Because UDP doesn't support end-to-end communication, it works well for broadcasts, in which sent data packets are addressed as being able to be received by all internet-connected devices. Large numbers of clients can receive UDP broadcasts without any server-side overhead.

However, because UDP does not require connections and data is not verified, this can lead to a multitude of problems while sending packets, including:

  1. There is no confirmation of the message-receiving computer's readiness.
  2. There is no protection against duplicate packets.
  3. There is no assurance that the recipient will get all of the bytes sent.


 

Start innovating with Mobius

What's next? Let's talk!

Mobius Software

As a company you'll get:

  • Get started quickly

  • Support any business model

  • Join millions of businesses

Questions? websupport@mobius.com