What is UDP?

UDP stands for User Datagram Protocol, and it is an efficient and fast communicating protocol to exchange messages between networks and devices. 

It’s very used on the Internet for tasks sensitive to time, like video transmissions, real-time systems, and DNS lookups. 

This protocol is a David P. Reed creation (1980). An American computer scientist whose contributions helped wireless communications networks and computer networking development. UDP has become fast an important Internet protocol suite’s element.

Learn what UDP header is!

How does it work?

The UDP splits every message into different packets (datagrams) to be passed on by the network’s devices (security gateways, routers, switch, etc.) to a final destination (server, host, etc.).

Every datagram includes a header with specific port numbers in order to differentiate users’ queries. It also offers a checksum choice for verifying that data transferred are complete. That is important because UDP divides the messages, but it neither puts datagrams together again nor numbers them.

High-speed communication is the most attractive UDP feature. It does not establish a formal connection before transferring the data. To be connectionless totally boosts the speed of that transfer. The problem is that data packets can get lost in transit, and it can open chances for DDoS attacks.

For what UDP can be used? – Advantages: 

  • It works for request-response protocols like Network Time Protocol or Domain Name System. DNS queries and responses can fit in a single IP packet.
  • Its simplicity makes it a choice for bootstrapping (self-starting process) without a complete protocol suite.
  • It is a protocol that does not acknowledge if the sent packets are received or not. This is a disadvantage that becomes an advantage for streaming media (audio and video).
  • It does not allow re-transmission delays. This makes it totally suitable for real-time apps, like communication, online gaming, voice-over IP and other protocols.
  • As a datagram creator, it can be used to model alternative protocols like a network file system or IP tunneling.
  • It supports multicast. This is useful for broadcasting information.
  • In general terms, all kinds of apps and tasks that can manage some packages’ loss could use UDP. Sometimes dropping packets, it’s better than waiting for delayed packets.

Disadvantages of using UDP:

In a handshake process, two devices check that they comply with specific requirements (latency, bit rate, etc.) to be connected. Then they will allow each other the sending of protocols. UDP does not use handshaking. This obviously opens risks. Besides, it does not check errors or correct them. It does not guarantee or confirm the correct delivery of information.

Differences between UDP and TCP (Transmission control protocol)

TCP means Transmission Control Protocol. It is also used for communicating computers. But with TCP, for computers to get connected, first, the handshake must run automatically. If the process finishes without problems, then they can transfer the packets of information. This makes TCP a more secure protocol than UDP. 

UDP is so much faster than TCP. The transferring of data can start without delay and extra steps.

TCP shows the order for data packets to be received, and it confirms the proper reception of them (in the correct order). In case a packet is missing for any reason, TCP asks it to be resent. UDP does not supply these features.  

What is really an advantage or a disadvantage depends on the purposes to use these protocols. What is seen as a con of UDP allows the Internet to be agile and efficient. For instance, confirmations of every packet sent and received could take lots of memory and time for routers. However, it’s absolutely possible to get proper confirmations and to complement UDP’s lacks through other apps.

Conclusion

UDP’s speed is not a minor feature. The most important is to understand its total functionality to know if it suits your needs properly.