TCP vs UDP

TCP is a connection-oriented protocol, whereas UDP is a connectionless protocol. A key difference between TCP and UDP is speed, as TCP is comparatively slower than UDP. Overall, UDP is a much faster, simpler, and more efficient protocol, however, retransmission of lost data packets is only possible with TCP.

TCP provides ordered delivery of data from user to server (and vice versa), whereas UDP is not dedicated to end-to-end communications, nor does it check the readiness of the receiver.

FeaturesTCPUDP
ConnectionRequires an established connectionConnectionless protocol
Guaranteed deliveryCan guarantee delivery of dataCannot guarantee delivery of data
Re-transmissionRe-transmission of lost packets is possibleNo re-transmission of lost packets
SpeedSlower than UDPFaster than TCP
BroadcastingDoes not support broadcastingSupports broadcasting
Use casesHTTPS, HTTP, SMTP, POP, FTP, etcVideo streaming, DNS, VoIP, etc