TCP vs UDP: which protocol asks whether the packet arrived
3 min read
TCP re-sends any piece of data whose arrival is never confirmed, while UDP sends each datagram once and never checks — so on TCP a lost packet arrives late, and on UDP it is simply gone. That is the difference between TCP and UDP in one sentence: both hand their packets to the same unreliable IP network, and only one of them listens for a reply. Everything else — ordering, retransmission, the reputation UDP has as "the unreliable one" — falls out of that single choice about whether anything comes back.

What TCP does
Every octet of data sent over a TCP connection carries a sequence number, so every octet can be acknowledged. When TCP transmits a segment it puts a copy on a retransmission queue and starts a timer. The receiver acknowledges cumulatively — an ACK of sequence number X means everything up to X arrived. When that ACK comes back the copy is deleted from the queue; if the timer expires first, the segment is retransmitted. The data arrives late, but it arrives. Traffic is therefore bidirectional at all times: data one way, acknowledgements the other, on the same connection. That returning stream of ACKs is the whole cost and the whole point.
What UDP does
UDP hands a datagram to IP and stops. There is no connection, no sequence number, and no retransmission queue. RFC 768 states the guarantee in its own words: "delivery and duplicate protection are not guaranteed." The specification describes no acknowledgement mechanism at all, because there is none. Nothing is sent back, so the sender is never told — and cannot be told — that a datagram was lost. A dropped datagram leaves a hole that nothing reacts to.
One correction the reel is careful about: UDP does not drop the packet. The network drops it; UDP merely declines to notice. That distinction is exactly what makes UDP correct for live audio and video, where a re-sent frame arriving 300 ms late is worse than a missing one.
TCP sender
keeps a copy of every segment on a retransmission queue, timer running
Network
drops the segment in flight
TCP sender
timer fires with no ACK — the same segment is re-sent, and arrives late
UDP sender
hands the datagram to IP: no queue, no timer, no sequence number
Network
drops the datagram in flight
UDP receiver
nothing arrives, nothing goes back — the loss is never noticed
TCP notices the gap and fills it; UDP has nothing listening, so the gap stays a gap.
Why UDP is faster — and why that framing misleads
People ask "why is UDP faster", and the honest answer is that it does none of TCP's work: no handshake before the first byte, no waiting on ACKs, no retransmission, and no holding later data back until earlier data catches up. Fewer round trips, less waiting, a smaller header. But "faster" hides the trade — UDP is faster the way not checking your work is faster.
The clearest example of what TCP pays for that speed is head-of-line blocking: because TCP delivers bytes strictly in order, a single lost segment stalls everything queued behind it, even data that already arrived, until the retransmission lands. UDP has no such rule, so nothing waits on the missing piece — which is precisely why real-time media rides on it and file transfers do not.
When to use UDP instead of TCP
The rule of thumb for when to use UDP instead of TCP is: choose UDP when a late packet is worse than a lost one, and TCP when a lost packet is unacceptable at any price. Live voice, video, and gaming tolerate the occasional hole but cannot tolerate a 300 ms stall waiting on a re-send — UDP. Files, payments, HTML, anything where every byte must arrive intact and in order — TCP, and let it retransmit. If you need reliability and UDP's freedom from head-of-line blocking, that is what QUIC is: an ordered, retried stream built on top of UDP, keeping the datagram base and rebuilding the guarantees per-stream above it.
TCP vs UDP in a system design interview
An interviewer is rarely asking you to recite header layouts. They are probing whether you can match a delivery guarantee to a failure mode. The crisp answer: TCP gives you reliable, ordered delivery by acknowledging and re-sending; UDP gives you unordered, best-effort delivery with no acknowledgement — so the design question is whether your workload can absorb loss or must eliminate it. Strong follow-ups to have ready: name head-of-line blocking as TCP's cost and the reason QUIC exists; note that "unreliable" is a formal term meaning delivery is not confirmed, not low quality; and point out that UDP does not lose your packet — the network does, and UDP simply has no machinery to react. Saying "UDP for speed" alone is the weak answer; the strong one names which guarantee you are trading away and why the workload can survive it.
Sources
- RFC 9293 — Transmission Control Protocol (§3.4 sequence numbers, §3.8.1 retransmission queue and timer; obsoletes RFC 793)
- RFC 768 — User Datagram Protocol ("delivery and duplicate protection are not guaranteed")
- RFC 9293 record — current TCP specification





