Why architecture matters here
TCP failures — bufferbloat, congestion collapse, RTT-limited throughput — trace to specific algorithms. Architecture matters because tuning algorithm + buffers + kernel decides real-world performance.
The architecture: every piece explained
The top strip is setup + delivery. 3-way handshake SYN/SYN-ACK/ACK. Sequence + ack ensure reliable ordering. Congestion control — CUBIC default, BBR for high-BDP. Window scaling allows beyond 64KB windows.
The middle row is recovery. Slow start ramps up. Fast retransmit on 3 dup ACKs. Nagle + delayed ACK can interact badly. SACK + FRTO improve recovery.
The lower rows are ops. TIME_WAIT closing state affects reuse. TCP tuning via sysctl + BBR. Ops — observability + kernel + long-fat pipes.
End-to-end flow
End-to-end: connection opens with 3WHS. Slow start ramps window. Loss triggers fast retransmit + reduces cwnd. BBR tracks bottleneck bandwidth + RTT for higher throughput on long-fat pipes. Close 4-way; TIME_WAIT prevents late segment issues.