PC Networking

What is UDP (User Datagram Protocol)?


Listen Later

What is UDP (User Datagram Protocol)?

UDP (User Datagram Protocol) is basically known as an alternative to TCP. UDP, which is a much faster protocol than TCP, is actively used for audio and video transmission.

The reason it works faster than TCP is that TCP is responsible for data integrity and authentication. UDP, unlike TCP protocol, is not responsible for data integrity and security.

It ensures fast transfer by enabling data transfer before an agreement is made with the receiving party. As a result, UDP is useful in time-sensitive communications such as voice over Internet Protocol (VoIP), domain name system (DNS) lookup, and video or audio playback. UDP is an alternative to the Transmission Control Protocol system.

How Does UDP Protocol Work?

The UDP protocol works similarly to TCP but discards all error checking items. All back and forth communication causes lag, which slows things down.

When an application uses UDP, packets are sent only to the recipient. The sender does not wait to make sure that the recipient has received the package, only continues to send subsequent packets. If the recipient occasionally misses several UDP packets, they are lost - the sender does not resend them. Losing all this overhead means devices can communicate faster.

UDP structure is used when speed is desired and error correction is not required. For example, UDP is often used for live streaming and online gaming.

Suppose you are watching a live video stream that is usually broadcast using UDP instead of TCP. The server just sends a constant stream of UDP packets to the watching computers. If you lose your connection for a few seconds, the video may freeze or jitter for a moment and then jump to the current bit of the stream. If you experience a minor packet loss, the video or audio may be distorted momentarily as the video continues to play without missing data.

This works similarly in online games. If you miss some UDP packets, player characters may appear to be teleported across the map while you receive new UDP packets. Since the game continues without you, there is no point in asking if you missed the old packs. The only thing that matters is what's happening on the game server right now, not a few seconds ago. Eliminating TCP's error correction helps speed up game connectivity and reduce latency.

More Podcasts

  • The Networking Ethernet in Google Podcast
  • The Wireless Communication in Google Podcast
  • The Networking Repeater in iHeart Podcast
  • The Networking Switch in Listennotes Podcast
  • The Networking Router in Himalaya Podcast
  • ...more
    View all episodesView all episodes
    Download on the App Store

    PC NetworkingBy PC Networking