Differences Between TCP and UDP - GeeksforGeeks
Differences Between TCP and UDP - GeeksforGeeks
between
GfG Classroom Program
TCP and UDP
Engineering Mathematics Discrete Mathematics Operating System DBMS
Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) both
are protocols of the Transport Layer. TCP is a connection-oriented protocol
where as UDP is a part of the Internet Protocol suite, referred to as the UDP/IP
suite. Unlike TCP, it is an unreliable and connectionless protocol.
Advantages of TCP
Disadvantages of TCP
Features of UDP
Advantages of UDP
We can not have any way to acknowledge the successful transfer of data.
UDP cannot have the mechanism to track the sequence of data.
UDP is connectionless, and due to this, it is unreliable to transfer data.
In case of a Collision, UDP packets are dropped by Routers in comparison to
TCP.
UDP can drop packets in case of detection of errors.
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.
An acknowledgment No acknowledgment
Acknowledgment
segment is present. segment.
the receiver.
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).
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.