TCP vs UDP

Amalakanthan R
3 min readMay 14, 2021

--

TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are network protocols that are implemented on the Network Layer of the OSI model. With the help of these protocols, data can be transferred from the user’s respective device to a web server over the internet. Both TCP and UDP help in converting the data into smaller units referred to as units. These data units include details such as: — the IP addresses of the respective sender and the receiver, the data that is to be transferred, multiple configurations, and the trailer (data which refers to the end of the packet). One of the most common difference between the TCP and UDP protocols is the way that data is being transferred.

TCP — Transmission Control Protocol

Transmission Control Protocol helps in determining how a respective device should be connected to the internet and how data can be transmitted between them. With the help of the TCP, it is possible to create a virtual network, when there are multiple computer networks connected. One of the main characteristics of the TCP is to provide a highly reliable and an end-to-end byte stream in order to function over an unreliable internetwork. Some of the benefits of the implementation of TCP include: -

1. Securely establishing a connection between different types of computers in a given network.

2. Operates or functions independently, regardless the operating system implemented by the user.

3. Helps in maintaining and executing several routing protocols.

4. Provides a convenient experience for the user by enabling an internetworking among organizations.

A unique identifier and a sequence number is assigned by the TCP to the data packet. This way the receiver is able to receive the packet conveniently and is able to track down the next packet.

If the sent data packet is correct and is sent in the correct order to the receiver, the receiver then sends an acknowledgement to the sender.

This way the sender is able to multiple packets to the same receiver.

In case there has been a problem with the order that the packets have been sent to the user, the receiver would remain silent as an indication that the same data packet has to be resent.

Sending and maintaining packets in a sequence helps data congestion and flow control, which in turn would help in fixing errors easily.

UDP — User Datagram Protocol

UDP is mainly a Datagram oriented standard protocol, which helps in both broadcasting and multicasting any type of network transmission. The term “Datagram” is known as a transfer unit that is combined with a packet-switched network. The functionality of the UDP is much similar to that of a TCP, except that it does not process error-checking or undergo any back-and-forth communication and deliverability. Some of the benefits of implementing an UDP connection is as follows: -

UDP is mainly implemented by time-sensitive applications and servers, where smaller queries can be managed by large servers.

UDPs are convenient for use, as they can be compatible with packet broadcasts to be sent all over the network and to be multicast.

Common areas that implement UDP are: — Domain Name System, Voice over IP, and Online games.

User Datagram Protocol works with the implementation of a simple transmission procedure, which does not execute any hand-shaking dialogues for reliability or data integrity. As mentioned earlier, UDP does not process any error-checking or correction, in order to eliminate such procedures at the network interface level.

--

--