Skip to content

TCP VS UDP

  1. TCP stands for Transmission Control Protocol whereas UDP stands for User Datagram Protocol.

  2. TCP is a connection-oriented protocol, which means that the connection needs to be established before the data is transmitted over the network. Whereas, UDP is a connectionless protocol, which means that it sends the data without checking whether the system is ready to receive or not.

  3. TCP is a reliable protocol as it provides assurance for the delivery of data packets. Whereas, UDP is an unreliable protocol as it does not take the guarantee for the delivery of packets.

  4. TCP is slower than UDP as it performs error checking, flow control, and provides assurance for the delivery of data packets. Whereas, UDP is faster than TCP as it does not guarantee the delivery of data packets.

  5. The size of TCP is 20 bytes. Whereas, The size of the UDP is 8 bytes.

  6. TCP uses the three-way-handshake concept. In this concept, if the sender receives the ACK, then the sender will send the data. TCP also has the ability to resend the lost data. Whereas, UDP does not wait for any acknowledgment; it just sends the data.
    Three Way Handshake

  7. TCP follows the flow control mechanism in which too many packets cannot be sent to the receiver at the same time. Whereas, UDP follows no such mechanism.

  8. TCP performs error checking by using a checksum. When the data is corrected, then the data is retransmitted to the receiver. Whereas, It does not perform any error checking, and also does not resend the lost data packets.

  9. TCP protocol is mainly used where a secure and reliable communication process is required, like military services, web browsing, and e-mail. Whereas, UDP protocol is used where fast communication is required and does not care about the reliability like VoIP, game streaming, video and music streaming, etc.