TCP vs UDP Comparison Table

Transmission Control Protocol (TCP) – is a connection-oriented communications protocol that is used to ensure reliable transmission of packets between computing devices in a network.

User Datagram Protocol (UDP) – is a connection-less communications protocol that is used especially for time-sensitive and low latency transmissions across the network.

Here’s a table of comparison:

Parameter TCP UDP
Protocol connection-oriented connection-less
Header Size 20 bytes Static header 8 bytes
Checksum Compulsory Optional
Overhead Heavy as it needs 3 packets to setup a socket connection Lightweight as no connections and message ordering tracking
Speed Slower speed due to re-transmission and reordering Faster as integrity is checked at the arrival time (via checksum)
Reliability Guaranteed messages will be delivered in order and no errors No guarantee that messages will be delivered in order and no errors
Connection Connection is made before application messages are exchanged Connection is not made before application messages are exchanged
Acknowledgment Use handshake protocol (SYN,SYN-ACK,ACK) No handshake
Data Segments Rearranged in required order Independent thus no inherent order specification
Flow Control Has congestion control mechanism No flow control
Error Checking Performs error checking and resends erroneous packets Performs basic error checking and discards erroneous packets (no error recovery attempt)
Use Priority for more reliability and less speed Priority for more speed and less reliability
Security SSL/TLS DTLS
Multicast Support No Yes
Broadcast Support No Yes
Performance Jitter and Throughput is Good Jitter is Best and Througput is Worst
Examples FTP,SMTP,HTTP,TELNET DNS,DHCP,RTP,TFTP,SNMP

Be First to Comment

Leave a Reply

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