Developer concepts

TCP vs UDP

The two main ways programs send data over the internet: one reliable and in order, one fast with no guarantees.

Downloading a file and playing an online game both send data over the internet, but they want very different things.

What they are

TCP and UDP are the two main ways programs send data over IP. TCP is reliable and ordered. UDP is fast and simple, with no guarantees.

How they work

TCP starts with a handshake to set up a connection. Data is numbered, the receiver confirms what arrived, and anything lost is sent again, so it all arrives complete and in order. UDP skips all that and just fires off packets, called datagrams. Some may get lost or arrive out of order.

Why it matters

Email, downloads and SSH use TCP, because every byte matters. Calls, games and DNS lookups usually use UDP, where late data is worse than lost data.

More from The Benmore Brief on YouTube

Put AI to work in your business.

Benmore's forward deployed engineers build and connect the software, from discovery to deployment.

Talk to us