Technology

Differences between TCP and UDP

We must say that the open systems interconnection model, better known as the OSI model, is a model for network protocols of layered architecture, which defines the different phases through which data must pass to travel from one device to another. over a communications network.

Within this transport layer, there are two mechanisms or protocols, the TCP protocol (Transfer Control Protocol) and the UDP protocol (User Datagram Protocol). In this sense, in this article we are going to point out the differences that exist between both protocols, starting with their characteristics and technical details.

TCP

Firstly, TCP stands for Transfer Control Protocol, which means Transfer Control Protocol. This is a connection-oriented transport protocol that aims to ensure that the data arrives correctly from the sender to the recipient, in the stipulated order and complete in a framework in which different workstations establish a connection/communication relationship.

We can say that when a machine or computer A sends data to a machine B, the latter is informed of the arrival of the data and confirms its proper reception. This is because the TCP protocol intervenes through a cyclic redundancy check (CRC), which is an error detection code that allows the integrity of the transmitted data to be verified. In this way, if the received data is corrupted, the TCP protocol allows recipients to request the sender to resend the corrupted data.

In this vein, since the TCP protocol is a connection-oriented service, a connection is established between hosts and guarantees delivery through the use of confirmations and the sequenced delivery of data. Therefore, programs that use TCP provide reliable data transport security. However, the TCP protocol has higher payload requirements and only supports point-to-point communication, making it a relatively slow system.

PDU

UDP stands for User Datagram Protocol, which means User Datagram Protocol. The UDP protocol is a connectionless protocol, this means that when a machine A sends packets to a machine B, the flow is unidirectional. In this sense, the data transfer is carried out without having previously made a connection with the destination machine and the recipient will receive the data without the need to issue a validation to the sender. For this reason, in the UDP protocol the data is sent without knowing if it will be received correctly, in order or complete.

Due to the above, this is a less reliable protocol than TCP, which is usually used for streaming applications (video or audio), since, in these, the rapid reception of data is more important than its verification. Finally, the UDP protocol has small payload requirements and can support point-to-point and point-to-multipoint communication, making it a fast system for data transport.

As can be seen, the most notable differences between the TCP and UDP protocols are:

TCP protocol UDP Protocol
It is a connection-oriented service in which a connection is established between hosts. It is a connectionless service in which a connection between hosts is not established.
This protocol guarantees delivery through the use of confirmations and the sequenced delivery of data. This protocol does not guarantee or confirm the delivery or sequence of data.
It has higher load requirements and only supports point-to-point communication. It has small load requirements and can support point-to-point and point-to-multipoint communication.
It is a relatively slow system for data transport. It is a fast system for data transport.

Leave a Reply

Your email address will not be published.

CAPTCHA


Back to top button