Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Advantages of UDP over TCP?

Tags:

tcp

udp

TCP has a greater computation overhead to ensure reliable delivery of packets. But, since modern networks are fast, is there any scenario in which performance of UDP outweighs the reliability of TCP?

Is there any other particular advantage of UDP over TCP?

like image 464
dev Avatar asked Sep 08 '13 06:09

dev


People also ask

What is the main advantage of UDP?

What is the main advantage of UDP? Explanation: As UDP does not provide assurance of delivery of packet, reliability and other services, the overhead taken to provide these services is reduced in UDP's operation. Thus, UDP provides low overhead, and higher speed.

When would you use UDP over TCP?

TCP is used in applications where reliability is more important, such as file transfer, emails, and web browsing. UDP is used in applications where speed is more important such as video conferencing, live streaming, and online gaming.

Why is UDP faster than TCP?

UDP is faster than TCP, and the simple reason is because its non-existent acknowledge packet (ACK) that permits a continuous packet stream, instead of TCP that acknowledges a set of packets, calculated by using the TCP window size and round-trip time (RTT).


1 Answers

I can see two cases, where UDP would have an upper hand over TCP.

First, one of the attractive features of UDP is that since it does not need to retransmit lost packets nor does it do any connection setup, sending data incurs less delay. This lower delay makes UDP an appealing choice for delay-sensitive applications like audio and video.

Second, multicast applications are built on top of UDP since they have to do point to multipoint. Using TCP for multicast applications would be hard since now the sender would have to keep track of retransmissions/sending rate for multiple receivers.

like image 162
Manoj Pandey Avatar answered Oct 18 '22 09:10

Manoj Pandey