Compare

Side-by-side on the decisions that recur: TCP vs UDP, HTTP/2 vs HTTP/3, flow vs congestion control, L4 vs L7, forward vs reverse proxy, IPv4 vs IPv6 — with when to choose each.

TCPUDP
What you getA reliable, ordered byte stream between two endpointsIndependent datagrams; each may be lost, duplicated or reordered
SetupThree-way handshake (1 RTT) before the first byteNone — the first packet is data
LossDetected via ACKs and retransmitted; the stream stalls until recoveredDropped silently; the application decides what to do
OrderingSequence numbers reassemble in order; a gap blocks everything behind itNo ordering; a late packet is just a late packet
Rate controlrwnd (receiver) and cwnd (network) throttle the senderNone built in — you can flood a link and hurt everyone
Header overhead20+ bytes, plus ACK traffic8 bytes
Used byHTTP/1.1, HTTP/2, TLS, SSH, databases, emailDNS, QUIC/HTTP/3, VoIP, video, game state, NTP
Choose this whenEvery byte must arrive, in order, and you would rather wait than lose data — APIs, files, database wire protocols.A late packet is worthless, or you are building your own reliability on top (QUIC): media, telemetry, DNS, game state.