What is TCP congestion control?
Answer
TCP congestion control prevents senders from overwhelming the network with more traffic than it can handle. TCP uses several mechanisms: Slow Start — begins transmission conservatively with a small congestion window (cwnd), doubling it each RTT until loss occurs or the Slow Start Threshold (ssthresh) is reached. Congestion Avoidance — once ssthresh is reached, cwnd grows linearly (1 MSS per RTT) instead of exponentially. Fast Retransmit — upon receiving 3 duplicate ACKs (indicating a gap in received data), retransmit the missing segment without waiting for a timeout. Fast Recovery — after fast retransmit, reduce ssthresh to cwnd/2 and continue congestion avoidance (do not restart slow start). Modern algorithms: TCP Cubic (default in Linux) — optimized for high-bandwidth, high-latency paths; uses cubic function for cwnd growth. TCP BBR (Google, Linux kernel) — model-based approach using measured bottleneck bandwidth and RTT rather than loss signals; significantly improves throughput on congested and long-fat networks. TCP QUIC (UDP-based) sidesteps TCP congestion limitations.