Differences Between TCP and UDP - GeeksforGeeks
Differences Between TCP and UDP - GeeksforGeeks
UDP
Prerequisite – Transport Layer responsibilities
Features of TCP
Advantages of TCP
Disadvantages of TCP
Features of UDP
:
Used for simple request-response communication when the
size of data is less and hence there is lesser concern about flow
and error control.
It is a suitable protocol for multicasting as UDP supports packet
switching.
UDP is used for some routing update protocols like RIP(Routing
Information Protocol).
Normally used for real-time applications which can not tolerate
uneven delays between sections of a received message.
Advantages of UDP
Disadvantages of UDP
In general, both TCP and UDP are useful in the context of the work
assigned by us. Both have advantages upon the works we are
performing, that’s why it is difficult to say, which one is better.
Sending Emails
Transferring Files
Web Browsing
Gaming
Video Streaming
Online Video Chats
An acknowledgment segment is
Acknowledgment No acknowledgment segment.
present.
Example: Suppose there are two houses, H1 and H2, and a letter has
to be sent from H1 to H2. But there is a river in between those two
houses. Now how can we send the letter?
Solution 1: Make a bridge over the river and then it can be
delivered.
Solution 2: Get it delivered by a pigeon.
FAQs
1. Which is faster: TCP or UDP?
UDP is faster than TCP. The reason for the faster UDP is its non-
existent acknowledge packet (ACK) which allows the streaming of
continuous packets where as TCP always works on the
acknowledgment of a set of packets calculated with the help of TCP
window size and Round Trip Time (RTT).
:
2. Which is better for Video Conferencing?
Both Protocols, TCP and UDP have several practical uses in day-to-
day life, but TCP has come as a better solution nowadays in the
modern era as a solution for this question of who is better at Video
Conferencing. The reason for this is because of the ability of UDP to
order data correctly and it also produces the output without error.
TCP can also be used for Video Conferencing when we have to focus
more on quality rather than speed. UDP is generally used when
speed matters most rather than the quality of the product. Some
data packets might be lost or somehow received out of order, but
UDP is more prominently used in the case of live streaming.
: