AI Workshop: learn to build apps with AI →
The Internet: The UDP protocol

Join the AI Workshop and learn to build real-world apps with AI. A hands-on, practical program to level up your skills.


UDP, User Datagram Protocol, is a transport 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 because it does not contain all the connection information TCP requires, and there is no handshake.

The drawback is that UDP is not as 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 into the protocol and must be handled at a higher level (built on top of it). There is no built-in check to control whether a packet was received and 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, it 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.

Lessons in this unit:

0: Introduction
1: What is a URL
2: What is a port
3: The DNS protocol
4: The TCP protocol
5: ▶︎ The UDP protocol