121820

Trending topics of the internet explained.

← Back to all articles
Technology

TCP vs UDP: The Two Protocols That Carry the Internet

The internet's transport layer has two main workhorses: the Transmission Control Protocol and the User Datagram Protocol. Nearly every application you use — web browsing, video calls, gaming, email — relies on one or both. The choice between them is a trade-off between reliability and speed.

TCP: Reliability First

TCP is connection-oriented. Before any data flows, TCP performs a three-way handshake: the client sends a synchronization packet, the server acknowledges it, and the client confirms back. Only then does data transfer begin. Every segment sent is numbered, and the receiver must acknowledge each one. If a packet goes missing, TCP detects the gap and retransmits. It also handles flow control and congestion control, slowing transmission when the network is congested.

This guarantees that data arrives intact and in order. The web, email, file transfers, and database connections all use TCP because they cannot tolerate missing or scrambled data.

UDP: Speed First

UDP skips the handshake entirely. It sends messages — called datagrams — without establishing a connection, without numbering, and without waiting for acknowledgments. There is no retransmission and no built-in ordering guarantee. If a datagram arrives out of order or gets dropped, the application either handles it or doesn't.

That might sound like a downgrade, but for real-time applications it's the right choice. Voice and video calls, live streaming, and online games prioritize low latency over perfect delivery. A dropped frame of video is less disruptive than a half-second of buffering while waiting for a retransmission. DNS queries also use UDP by default because a single-packet query and response fits neatly into UDP's lightweight model.

Both protocols serve distinct needs. One is not better than the other — they solve different problems. Understanding the trade-off explains why some apps feel snappy and responsive while others feel deliberate and dependable.

Share: 𝕏 R in

More in Technology