Header Ads Widget

Responsive Advertisement

TCP vs UDP Comparison

Whenever a computer wants to communicate with another computer, the communication between those two computers needs to be good and reliable, so it can guarantee that the data is received correctly. 

For example, when you want to view a web page, or download a file, or look at an email, you'd expect to view the web page intact and in order, with nothing missing. Or if you're downloading a file, you would want the entire file and not just a part of the file, because if data is missing or out of order, then it wouldn't be of any benefit to you. So this is where TCP comes in.


TCP [Transmission Control Protocol] And it is one of the main protocols used in TCP/IP networks, and TCP is used to guarantee that all data is received and in order the data is received and in order, because without TCP, then some of the data could be missing or out of order because if you view a web page without TCP, your web page may be messed up. Images may be missing or text may be backwards and out of order.

Or if you download a file, Then you might not get the entire file, or you could get the file out of order, which would render the file useless.

TCP vs UDP Comparison

So again, this is where TCP comes in.

Now TCP is a connection-oriented protocol, which basically means that it must first acknowledge a session between the two computers that are communicating. So the two computers verify a connection before any communication takes place. And it does this by using a three-way handshake.

So the first step is that a computer will send a message called an SYN. S-Y-N Then the receiving computer will send back an acknowledgment message telling the sender that it has received the message & then finally the sending computer sends another acknowledgment message back to the receiver.

TCP vs UDP Comparison

And then once this has taken place data can be delivered. Another important thing to remember about TCP is that it guarantees the delivery of the data. So if a data packet goes astray and doesn't arrive, then TCP will resend it. Now UDP is very similar to TCP.

UDP is also for sending & receiving data. But the main difference is that UDP is connection-less.

Which means that it does not establish a session and it does not guarantee data delivery. So when a computer sends their data, it doesn't really care if the data is received at the other end, and that's why UDP is known as the "fire-and-forget" protocol, because it sends data, and it doesn't really care what happens to it as this demonstration will show.

Another point to remember is because of the less overhead that's involved of not guaranteeing data delivery, UDP is faster than TCP. I hope now you know what is difference between TCP and UDP.

Post a Comment


class='back-top' title='Back to Top'/>