Skip to content

The UDP Protocol

A high level overview of the User Datagram Protocol

UDP, User Datagram Protocol, is a transfer protocol, an alternative to TCP.

Its main difference from TCP is that it's connectionless.

This implies that it's faster, each packet sent is more lightweight, as it does not contain all the information needed in TCP, and it does have a lighter handshake process.

The drawback is that UDP is not reliable as TCP.

In TCP, if a packet gets lost, the protocol is able to handle it and the packet is re-sent.

In UDP, this is not built-in into the protocol, and must be handled at a higher level (built on top of it). There is no built-in check to control if a packet was received, and if it is received correctly.

UDP was defined in RFC 768 in 1980.

Some of the most notable application protocols that rely on the UDP layer are DNS and DHCP, and more importantly is the base layer of HTTP/3, the next version of HTTP.

The UDP protocol uses ports to allow communication between processes, like with TCP.

THE VALLEY OF CODE

THE WEB DEVELOPER's MANUAL

You might be interested in those things I do:

  • Learn to code in THE VALLEY OF CODE, your your web development manual
  • Find a ton of Web Development projects to learn modern tech stacks in practice in THE VALLEY OF CODE PRO
  • I wrote 16 books for beginner software developers, DOWNLOAD THEM NOW
  • Every year I organize a hands-on cohort course coding BOOTCAMP to teach you how to build a complex, modern Web Application in practice (next edition February-March-April-May 2024)
  • Learn how to start a solopreneur business on the Internet with SOLO LAB (next edition in 2024)
  • Find me on X

Related posts that talk about network: