No connection required (messages are sent without a handshake)
Messages are called “datagrams”
Does not ensure in-order delivery, and may drop packets
Detects errors, but does not fix them
Faster than TCP
Examples: DNS, live video streaming, Voice over IP.
Multiplexing and De-multiplexing
This is how we can send messages to specific applications within one IP address, as well as send
multiple messages from one IP address. Both of these are resolved using ports
Therefore, when using UDP, the transport layer is responsible for labelling packets with the port number of the origin application as well as the port number for the destination application.
UDP Header
UDP prepends four 2-byte fields as a header to every datagram, so the header is 8 bytes in size.
Source port
Destination port
Datagram length
Checksum
Why UDP?
UDP is faster, since it doesn't have the overhead of the TCP retransmission mechanism.
Reliability can be built on top of UDP.
UDP gives finer control over what messages are sent, when they're sent, and how reliably they're sent.
UDP allows custom protocols
Quick UDP Internet Connections (QUIC) is an experimental transport layer built on top of UDP and designed by Google. It is used by most Chrome connections to Google's servers.
UDP has a smaller header, and so is significantly faster.