Knowledge Guide
HomeSystem DesignNetworking Fundamentals

TCP Deep — Handshake Cost, Congestion Control & Head-of-Line Blocking

The internals of TCP that actually bite you

You know TCP is reliable and ordered (see Networking Fundamentals). The systems-relevant question is why a service feels slow even when the network "works" — and the answers are connection setup, congestion control, and head-of-line blocking.

1. A new connection is slow on purpose

TCP delivers an ordered stream, so a lost packet 2 blocks already-arrived packets 3 and 4; QUIC uses independent streams so one stream loss does not block the others
TCP delivers an ordered stream, so a lost packet 2 blocks already-arrived packets 3 and 4; QUIC uses independent streams so one stream loss does not block the others

2. Head-of-line (HOL) blocking

TCP guarantees ordered delivery, so the application can't receive byte N+1 until byte N arrives. If one packet is lost, every packet already received behind it waits in the buffer until the lost one is retransmitted — head-of-line blocking. One dropped packet stalls the whole stream.

This is why HTTP/2, despite multiplexing many requests over one connection, still suffers: all its streams share one TCP connection, so a single packet loss blocks all of them. HTTP/3 / QUIC fixes it by running independent streams over UDP and re-implementing reliability per-stream — a loss on stream B no longer blocks streams A and C.

Other latency gotchas

Takeaways


Re-authored for this guide; HOL-blocking diagram hand-authored as SVG. Follows the TCP/QUIC specs and the HTTP/2-vs-3 literature. See also: Networking Fundamentals (TCP/UDP, L4/L7), the HTTP-versions advanced topic, CDN.

🤖 Don't fully get this? Learn it with Claude

Stuck on TCP Deep — Handshake Cost, Congestion Control & Head-of-Line Blocking? Open Claude, copy a block below, and it'll teach you this exact concept — visually and interactively.

🎨 Explain it visually

Build the mental picture, not memorization.

I just read a lesson on **TCP Deep — Handshake Cost, Congestion Control & Head-of-Line Blocking** (System Design) and want to truly understand it. Explain TCP Deep — Handshake Cost, Congestion Control & Head-of-Line Blocking from first principles using ONE vivid real-world analogy and a visual mental model — draw it as ASCII art or a clear step-by-step diagram — with a concrete example using real numbers. Then ask me one question to check I got the mental picture, and wait for my reply. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🤔 Walk me through it (interactive)

Socratic — adapts to where you're stuck.

Teach me **TCP Deep — Handshake Cost, Congestion Control & Head-of-Line Blocking** interactively. Ask me ONE guiding question at a time, wait for my answer, and adapt to my confusion — build the idea with me step by step instead of explaining it all at once. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🧪 Quiz me & fix my gaps

Active recall exposes what you missed.

Quiz me on **TCP Deep — Handshake Cost, Congestion Control & Head-of-Line Blocking** with 5 questions, easy to tricky, ONE at a time. Tell me if each answer is right; at the end, explain clearly what I got wrong and why. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🧠 Make it stick

Intuition + hook + flashcards for long-term memory.

Help me remember **TCP Deep — Handshake Cost, Congestion Control & Head-of-Line Blocking** for the long term: give the one-sentence intuition, a memorable hook/mnemonic, a tiny worked example, and 3 active-recall flashcards (Q -> A). If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.

📝 My notes