In this section, you will read about UDP and difference between UDP and TCP.
UDP (User Datagram Protocol)
The User Datagram Protocol (UDP) is a transport protocol that supports Network Application. It layered on just below the ‘Session’ and sits above the IP(Internet Protocol) in open system interconnection
model (OSI). This protocol is similar to TCP (transmission control protocol) that is used in client/ server programs like videoconference systems expect
UDP is connection less.
User Datagram Protocol transports the data between the computers in the form of data packets, but it does not track the data and never shows the confirmation report.
UDP and TCP both are used to transport the data but there are some differences in it.
- UDP is a connectionless protocol while TCP is connection oriented.
- UDP never track the data, so never shows the confirmation report, while TCP track the data and show confirmation report, after receiving, if the data losses anywhere it resends that particular data.
- UDP transport the data in the form of Data packets, whereas TCP transport the data in long stream. It flows continuous. To make in the form of packets stack is required on the both end for reassembling them. In the sending end, stack breaks the flow of the data and sends the data in the form of packets, on the receiving end, the stack reassemble the data from packets to flowing form.
- TCP has 20 bytes of overhead while UDP has only 8 bytes of overhead.
- Times can be established in TCP protocol in sending the data, because the data packets goes one after one in the sequence form and each packets takes a specific time period, whereas no times period can be established in the UDP protocol case, because the data transmits in non-sequence form.
- UDP transmit the data according to the generation of data, which is produced by the bandwidth of the Internet, if there is any obstacle in the network it could be lost due to the overflowing of data in the router. On the other hand TCP has a cognition control mechanism that indicates the senders about the congestion and it tolerate the transmitting process for some times.
IN spite of being so many demerits, UDP is very useful in some circumstances, especially in speed and network management. Its speed is faster than TCP protocol. UDP transports the data periodically and with no guarantee. So the updated data can be send after a certain period, which not only recovers the lost data but also it updates network. While in the TCP it is very difficult to recover the lost data at the congestion stage. It is also not suitable to carry network management due to its transmitting methodology.