Transmission Control Protocol (TCP) is connection-oriented, which means once a connection has been established, data may be transmitted in both directions. TCP has inbuilt systems to check for errors and to ensure data is delivered in the order it had been sent, making it the right protocol for transferring data like still pictures, data files, and web pages.
User Datagram Protocol (UDP) is a less complicated, connectionless internet protocol where error-checking and recovery services aren't needed. With UDP, there's no requirement for opening, maintaining, or terminating a connection; data is continuously sent to the receiver, whether or not or not they receive it.
Basis | Transmission Control Protocol (TCP) | User Datagram Protocol (UDP) |
Type of Service | TCP is a connection-oriented protocol, which means that devices must establish a connection before exchanging data and close it after transmission. | UDP, is a datagram-oriented protocol that doesn't require connection setup, maintenance, or termination. |
Reliability | Since TCP ensures that data will reach the destination router, it is reliable. | UDP cannot provide a guarantee that data will reach its intended location. |
Error checking mechanism | Numerous error-checking mechanisms are offered by TCP. It does so because it offers data acknowledgment and flow control. | UDP has only the basic error checking mechanism using checksums. |
Sequence | Sequencing of data is a feature of TCP. Packets arrive in the exact order at the receiver. | Sequence of data is not followed in UDP. |
Speed | TCP is significantly slower than UDP. | UDP is simpler, faster, and more efficient than TCP. |
Weight | TCP is heavy-weight. | UDP is lightweight. |
Protocols | TCP is used by HTTP, HTTPs, FTP, SMTP and Telnet. | UDP is used by TFTP, DNS, DHCP, SNMP, VoIP and RIP. |
Below are the following examples of TCP:
We all are alert to the importance of Text Communication in today’s world. Any alteration in text between sender and receiver can't be tolerated. Thus transmission control protocol is used in Text Communication because of its reliable transmission, error control, and sequential order of receiving of the data. Example : Whatsapp, Instagram, Google Chat,iMessage.
TCP really comes in handy when order of the data matters and data loss cannot be tolerated and hence, FTP or transfer of file uses TCP protocol.
HTTP protocol is used to access the World Wide Web as TCP provides retransmission of data, inorder data transmission
Blow are the following examples of UDP:
VoIP and Video Conferencing : Many times, we observe that when connection is lost and established again during a call, we do not hear the sound which was lost again. This is due to the fact that VoIP uses UDP which does not retransmit data in an orderly manner and prioritizes the speed of transmission of data. Eg: Zoom, Skye, google meet, etc.
Online Games: Most of the online games use UDP as in multiplayer games, the lag or amount of delay cannot be tolerated. Again, the speed of transmission of data matters a lot in online gaming.
DNS – Domain Name System helps mapping domain names with their respective IP dresses. Speed of web page loading is priority hence, UDP is the best option.
Resources: