ELI5 · Networking & the web

TCP vs UDP.

Registered mail that is tracked and re-sent, versus postcards you fire off and hope arrive.

Data crosses the internet in small chunks called packets. TCP and UDP are two different deals about what happens to those packets along the way.

TCP is registered mail: tracked, confirmed, and re-sent if lost. UDP is a stack of postcards: thrown in the box, no tracking, no guarantees, but almost no fuss.

  1. Sign here. And here.
    #1 #2 #3
    1

    TCP is registered mail: every chunk numbered, tracked, and signed for.

  2. gone! re-send #4
    2

    Lose a piece and it’s noticed and sent again — so it all arrives, in order.

  3. all waiting… #3 #4 ? #5 #6 #7
    3

    The catch: everything behind a lost piece waits for the resend (head-of-line blocking).

  4. No time, go go go!
    FWOOMP
    4

    UDP is a postcard cannon: fired off fast, no receipts, no resending.

  5. 5

    Some arrive late, out of order, or not at all — and UDP genuinely doesn’t care.

  6. TCP files · email every byte counts UDP calls · video fast & live vs
    6

    Every byte matters (files, email)? TCP. Fast-and-live (calls, video, games)? UDP.

Same goal — move data — two very different deals about what happens on the way.

When each one is the right call

Use TCP when every byte matters: web pages, files, email, anything where a missing piece would corrupt the result. The small cost in speed buys correctness.

Use UDP when being fast and current beats being complete: live video, voice calls, and games. If a packet is lost there is no point resending it, because by the time it arrives the moment has passed. A dropped video frame beats a frozen call.

The hidden cost of being careful

TCP’s resending has a side effect: if one packet is lost, everything behind it has to wait for the resend before it can be used, even if it already arrived. That stall is why some modern protocols (like the QUIC behind HTTP/3) rebuild reliability on top of UDP instead, getting the guarantees without the traffic jam.

The real version TCP vs UDP, in depth →
Found this useful?