Networking & Protocols
TCP handshake: multiple-choice review
Six questions that cut across the whole unit. Each one mirrors a call you make in a real incident — not a flag to name, but a tradeoff to weigh while latency or memory is on fire.
Confirm you can connect the handshake’s RTT cost, ISN security, flood defence, congestion control, and the canonical production pathologies — the synthesis the individual lessons built toward.
A REST client opens a fresh TCP connection per request to an origin 140 ms RTT away, then layers TLS 1.3. Why does each call feel slow even though the payload is tiny, and what is the structural fix?
Why does RFC 6528 compute the Initial Sequence Number as a time-based counter plus a keyed hash of the 4-tuple, rather than starting from zero?
During a SYN flood your public listener stays up with tcp_syncookies=1, but legitimate clients on a 200 ms transcontinental path report throughput stuck near a trickle. Why?
A 4K-video service over cellular (150 ms RTT, ~1% random loss) sees CUBIC throughput collapse to a fraction of link capacity. Switching to BBR restores near-line-rate. What is the underlying reason?
A Redis client on the same datacenter host shows a steady ~40–200 ms p99 on small pipelined commands, with no loss and no CPU pressure. Root cause?
A load balancer returns EADDRNOTAVAIL on outbound connect() to one backend; ss shows ~30k TIME-WAIT sockets to that origin. A teammate proposes lowering MSL to drain TIME-WAIT faster. What is the correct read?
The unit’s through-line is one decision chain: the handshake costs a round-trip you amortise with connection reuse, ISN randomisation secures it, SYN cookies defend it under flood (at the cost of dropped options), congestion control decides how fast it fills the pipe (CUBIC reacts to loss, BBR models bandwidth and RTT), and the canonical production failures — Nagle plus delayed-ACK stalls, CLOSE-WAIT leaks, TIME-WAIT exhaustion — each have one correct lever and several plausible wrong ones. Knowing which lever, and why the others fail, is the synthesis.