Library

15.6.4 TCP And UDP Compared

Although both TCP and UDP operate at the Transport Layer, they have been designed for different purposes.

FeatureTCPUDP
ConnectionConnection-orientedConnectionless
ReliabilityGuaranteed deliveryBest effort
Packet OrderingPreservedNot guaranteed
RetransmissionYesNo
Protocol OverheadHigherLower
Typical ApplicationsWeb, email, file transferVoice, video, gaming, DNS

Neither protocol is universally better. The appropriate choice depends upon the requirements of the application. Applications requiring reliable delivery generally use TCP, while delay-sensitive applications often favour UDP.