← Lessons

quiz vs the machine

Gold1480

Networking

Slow Start and Congestion Avoidance

How TCP probes for available bandwidth and backs off when the path is congested.

5 min read · core · beat Gold to climb

Probing the unknown

A new TCP connection does not know how much bandwidth the path can carry. Sending too fast causes loss, too slow wastes capacity. TCP solves this with a congestion window that grows and shrinks based on feedback.

Two phases

  • In slow start the window doubles roughly every round trip, growing exponentially until it reaches a threshold or loss occurs.
  • In congestion avoidance the window grows by about one segment per round trip, a gentle linear climb that probes for a little more bandwidth.

The switch point is the slow start threshold. When loss is detected, TCP treats it as a congestion signal, cuts the window, and lowers the threshold, then resumes probing more cautiously.

Why this shape

Exponential growth quickly finds a usable rate, while linear growth near the limit avoids overshooting badly. Cutting on loss shares the path fairly with other flows. This additive increase and multiplicative decrease is what keeps the internet from collapsing under its own load.

Key idea

TCP ramps up exponentially in slow start, then climbs linearly in congestion avoidance, and cuts the window on loss to stay fair and stable.

Check yourself

Answer to earn rating on the learn ladder.

1. How does the congestion window grow during slow start?

2. What does TCP do when it detects loss?

3. What is the difference between the two phases?