qasim@wiki:~$
Networking · Visual Explainer

TCP vs UDP

TCP vs UDP infographic by Muhammad Qasim
MQ Explains — TCP vs UDP

The concept

TCP builds a connection first and guarantees every byte arrives in order — you pay for that in latency and overhead. UDP just sends — no handshake, no guarantee, no ordering, and that's exactly why it's fast. You pick based on whether a lost packet is a tragedy or an irrelevance.

Key distinctions

TermWhat it means
TCPThe 3-way handshake (SYN → SYN-ACK → ACK) establishes sequence numbers; lost segments are retransmitted, order is guaranteed. HTTPS, SSH, email.
UDPA datagram with ports and a checksum, and that's it. If it's lost, nobody at the transport layer notices. DNS, VoIP, video, gaming.
Head-of-line blockingIn TCP, one lost segment stalls everything behind it — the problem QUIC was built to solve.
The modern twistHTTP/3 runs over QUIC, which runs over UDP — reimplementing reliability in userspace to escape TCP's blocking.

Why it matters in practice

The choice is about consequence, not speed for its own sake. A corrupted video segment is worse than a late one; a dropped game position is irrelevant a frame later.

← Back to the Knowledge Base