Difference Between TCP vs UDP

By | May 9, 2020
TCP vs UDP

In the Transport layer, we have two protocols that can be used to send data from one system to another, and these protocols are TCP/IP and UDP. Both TCP and UPD are capable of sending bits of data, which are also known as packets on the internet. When we send data over the internet it sends into packets no matter which transport internet protocol, we use they send data in packets. There are many other Internet protocols that are used to send data but for most of the cases, we use TCP or UDP. Here in this article, we have provided a simple difference between TCP and UDP.

Before comparing these two terminologies let’s have a brief introduction of both.

Vamware

What is the TCP? (Transmission Control Protocol)

TCP stands for Transmission Control Protocol, and it is the most used and common protocol we used on the internet. Whenever we want a computer to communicate with another computer the communication between those two computers needs to be robust and reliable so the data sent from one computer reaches another computer completely and in a correct format without any distortion or missing data. So, if we want the data to reach the receiver computer without any distortion, we have to use TCP which makes sure that the reviver receives all the data completely and in order. There are other protocols that can also transmit data from the source computer to the receiver computer, in those protocols, there is a possibility that during transmission some of the data may get lost which can cause an error in the complete file.

TCP

TCP is a Connection-Oriented protocol which means it set sessions between two computers and the data do not transmit until all the sessions get acknowledge by the source and receiver. TCP uses three-way handshake communication before transmitting data from one computer to another, in this communication, the sender will send a message to the receiver, then receiver acknowledges the message and send back an Acknowledge message, at last, the sender acknowledges the Acknowledge message of sender then only the flow of transmitting data take place.

What is UDP? (User Datagram Protocol)

UDP stands for User Datagram Protocol, and it is very similar to TCP, like TCP we can also use UDP internet protocol to send and receive data from one computer to another. Unlike TCP, UDP is a Connectionless oriented protocol, which means there is no session set up between the sender and receiver before sending and receiving data.

User Datagram Protocal

As there is no session between the sender and receiver computers, so there is no question of acknowledging or rejecting any transmission, which makes this protocol vulnerable and fast at the same time. It is also known as Fire and forget protocol because UDP does not concern about the quality of the sending and receiving data when users send data there is a possibility that the receiver does not get the complete file.

TCP vs UDP: Head to Head Comparison

Here we are sharing the difference between TCP and UDP in Tabular form.

TCP UDP
Full-Form
Transmission Control Protocol User Datagram Protocol
Connection
TCP is Connection-oriented Protocol, this mean TCP set a connection between sender and receiver before transmitting data UDP is a connectionless oriented protocol, and it does not set a connection between the sender and receiver.
Data Reliability
TCP gives more reliability of transmitted data, it makes sure that intact data transmitted to the receiver without any distortion. UDP is not reliable, transmitted data could be missed or altered in UDP.
Data Ordering
The receiver would receive the data in the same order as the sender sent. The data could be disordered.
Speed
TCP is slower than UDP because it creates a connection and acknowledges the session before transmitting data. UDP is faster because it does not care for any communication between user and receiver.
Data Boundary
TCP does not provide data boundary to the message segments UDP provides a data boundary.
Weight
TCP considered as Heavyweight because of creating a session between computers UDP is a lightweight protocol
Congestion control
TCP has support for congestion control so data could be sent in a proper and ordered manner UDP does not support congestion control
Applications
TCP used for those programs and applications which demand reliability and security, where we can compromise with the performance a little bit. UDP used when we need speed.
Protocols
FTP, Telnet, SMTP, IMAP etc. DNS, BOOTP, DHCP, TFTP, etc.

You may also Interested In:

Leave a Reply

Your email address will not be published. Required fields are marked *