How it works · 9 of 36 Foundation

What is the difference between TCP and UDP?

Check every piece, or keep moving

TCP vs UDP: TCP numbers every piece, checks it arrived and resends what was lost, so data arrives complete and in order. UDP sends and moves on: faster, but lost pieces stay lost. Apps choose the one that suits them.

Loading the animation…

Say it like this TCP numbers every piece and resends what's lost, so data arrives complete; UDP just sends and keeps moving, so it's faster but lost pieces stay lost.

Under the hood — for builders
Real case: what a browser video call runs on
The standard behind browser video calls (WebRTC) assumes UDP for the call itself, and keeps TCP for the web page around it:
Worked example: waiting before the first byte
With a 50 ms round trip, count the trips before your request can leave. TCP's handshake, then TLS 1.3 sealing it, then QUIC doing both at once:
Why address lookups use UDP
A DNS question and its answer usually fit in one small UDP message. If it's lost, the phone simply asks again:
TCP in one line
Numbers every byte, waits for receipts, resends gaps, delivers in order. Defined in RFC 9293.
UDP in one line
Ports, a length and a checksum, nothing more: the whole header is 8 bytes (RFC 768). Order and resends are the app's problem.
Measure it
Windows: netstat -an -p UDP lists UDP sockets; netstat -an -p TCP lists TCP ones. Calls and DNS show up under UDP.
Watch out
Firewalls list TCP 443 and UDP 443 separately: a rule that opens only TCP 443 quietly blocks QUIC.
Sources
RFC 9293 (TCP), RFC 768 (UDP), RFC 8835 (WebRTC transports), RFC 1035 (DNS), RFC 9000 (QUIC), RFC 8446 (TLS 1.3). Read 28 Nov 2026.

What happens in the TCP vs UDP animation, step by step?

  1. Apps send their pieces in one of two ways. TCP numbers every piece and checks it arrived. UDP just sends and moves on.
  2. Your turn: play the game. For each app, pick TCP or UDP.
  3. Anything that must arrive complete uses TCP. Live calls, and quick one-question lookups, use UDP.
  4. TCP's checking has a cost: a handshake, hello, hello back, OK, before the first piece of data moves. UDP sends at once.
  5. Newer web traffic runs on QUIC, which rides on UDP but adds its own checks, so it gets complete data without TCP's separate handshake.
  6. TCP checks every piece arrived; UDP keeps moving. Next: how do names like irctc.co.in stand in for IP addresses?

What everyday example explains TCP vs UDP?

A registered letter with a signed receipt (TCP) against shouting across a busy room (UDP).

Why should a team care about TCP vs UDP?

Explains why video calls stutter instead of stopping, why firewalls list "TCP 443" and "UDP 443" separately, and how newer protocols get the best of both.