Difference between TCP and UDP internet Protocols

Learn the difference between UDP and TCP Internet Protocols (IP) traffic and the usage with examples.

Written By Lorenzo Vincent

Updated at September 1st, 2023

User Datagram Protocol (UDP) and Transmission Control Protocol (TCP) both are transportation protocols. They are core protocols and work based on transport layer TCP/IP model with completely different usage.

OpenVPN - UDP
OpenVPN - TCP
Reliability: UDP is less reliable as it is a connectionless protocol. When you send a message using UDP internet protocol, it is not guaranteed if it will reach the destination or get lost in between the transmission. UDP may also corrupt a message during transfer. Reliability: TCP is more reliable as it is connection-oriented internet protocol. If you deliver a message using TCP protocol, it will reach the destination unless the connection fails. If connection drops the server will request the lost part and cause no corruption during transferring the message.
Order: If you send two messages, you don’t know what order they will arrive in.
Order: If you send two messages one after another. It is guaranteed that first one will arrive first. With TCP, you don’t have to worry about the order of the messages. They will arrive in the same order as you send them.
Weight: UDP is a lightweight internet protocol. No order of messages and no connection. It just sends and forgets. It is a lot faster than TCP, and the OS has very little to do to translate the message from the packets.  Weight: TCP is heavy weight internet protocol. It is connection-oriented and manages order of messages. It requires more time to do the work and the OS needs little more time to read the message from the packets.
Datagrams: Each data packet is sent individually to guarantee its completeness on arrival. Also, there is only one packet per one read call. Streaming: In TCP protocols, packet reads one after another. Data is read as ‘Stream’, so there may be multiple packets for one read call. 
Sample: Domain Name System (DNS UDP port 53), Streaming Applications such as IPTV, VoIP, Trivial File Transfer Protocol (TFTP) and MMORPG (Multiple role playing games) Sample: World Wide Web (Apache TCP port 80), File Transfer Protocol (FTP port 21), e-mail (SMTP TCP port 25 Postfix MTA) and Secure Shell (OpenSSH port 22) etc.