What is UDP?

Feb 23, 2023

User Datagram Protocol (UDP) is a transport-layer protocol in the OSI reference model. Like TCP, it is used to process data packets. It is a connectionless transport layer protocol. UDP provides continuous packet grouping and assembly and cannot sort the packets, that is, it cannot know whether the packets arrive safely after sending. It is a transaction-oriented simple and unreliable information transmission service.
Features of UDP

1.UDP is connectionless. Data can be sent as long as the IP address and port number of the peer party are known.

2. There is no confirmation mechanism and no retransmission mechanism. If the information cannot be sent to the other party due to network problems, the UDP protocol layer does not return any error information to the application layer.

3. Datagram oriented. UDP is just a carrier. After adding headers to the UDP packets sent by applications, the sender delivers the packets to the IP layer. It does not split or merge the packets, but retains the boundaries of these packets. Therefore, the application needs to select the appropriate packet size.

4.UDP supports one-to-one, one-to-many, many-to-one, and many-to-many interactive communication. In short, UDP provides unicast, multicast, and broadcast functions.

5.UDP is delivered with maximum effort, with good real-time performance, high work efficiency and no congestion control, so the sending rate of the source machine will not be reduced even if the network is congested.

6. Header overhead is small, only eight bytes, shorter than TCP header. Compared with TCP, UDP occupies less system resources.