Before any data flows over TCP, the client and server perform a three-way
handshake: the client sends a SYN, the server replies
with SYN-ACK, and the client confirms with ACK. Once
connected, TCP does not blast data at full speed — it probes the network's capacity
using congestion control, growing its congestion window (cwnd)
exponentially during slow start, then linearly once it nears the slow-start
threshold (ssthresh), and cutting back sharply whenever a packet is lost.
The sawtooth pattern of TCP congestion windows is one of the most reproduced graphs in networking — Van Jacobson's 1988 fixes for congestion collapse, which introduced slow start and congestion avoidance, are credited with keeping the early Internet from grinding to a halt under load.
Watch a client and server open a TCP connection with the SYN, SYN-ACK, ACK three-way handshake, then send data in bursts that grow the congestion window exponentially during slow start and linearly during congestion avoidance — until a simulated packet loss forces a sharp cutback.
The three-way handshake that establishes every TCP connection, and the additive-increase/multiplicative-decrease behaviour that produces the classic congestion-window sawtooth under loss.
Adjust link latency, packet loss rate, and the slow-start threshold, then watch packets fly across the link and the congestion-window bar chart respond in real time.
Van Jacobson's 1988 congestion-control algorithms — slow start, congestion avoidance, fast retransmit — are widely credited with saving the early Internet from repeated congestion collapse.