Difference between TCP and UDP
If you work with computers, you probably have heard about the TCP and UDP protocols. While they both are mechanisms to transmit data to other computers, they do not operate in the same manner. Below I’ll show you some differences between the two data protocols.
TCP (stands for “Transmission Control Protocol”)
- It’s a connection-orientated data protocol
- TCP is best used for applications that require high reliability
- There is more overhead (more computer resources used) when using TCP
- Other protocols such as: HTTP, HTTPs, FTP, and SMTP make use of the TCP protocol
- TCP makes sure that the order in which data is received is the same order in which it was originally sent
- TCP is typically slower than UDP
- TCP allows for “flow control”
- TCP checks for errors in the data transmission
- TCP acknowledges segments
- TCP has both error checking and options to recover in-case of an error
UDP (stands for “User Data-gram Protocol”)
- Not a connection-oriented protocol
- UDP is useful for applications that need fast transmission of data (regardless of data integrity)
- Less overhead when using UDP, since UDP is a connectionless protocol
- Other protocols such as: DNS, DHCP, and VOIP make use of the UDP protocol
- UDP does not make sure that data received is in the same order that it was originally transmitted (less reliable, but faster)
- UDP is typically faster than TCP
- UDP has no “flow control”
- UDP does not check for errors in the data transmission (less reliable, but faster)
- UDP does not acknowledge segments
- UDP has error checking but does not have any way to recover from errors it detects
Posted in Computers, Internet and Servers, Operating Systems