TCP Congestion Control Explained: How the Internet Avoids Gridlock

TCP congestion control explained in plain terms means understanding how millions of computers share the same cables without bringing the whole internet to a halt. The central question is what stops every sender from blasting data at full speed at once, and the answer is a set of rules, built into TCP itself, that probe for spare capacity and back off the moment the network shows strain.

Congestion control is the algorithm that decides how much unacknowledged data a sender may have in flight at any moment. It is the reason a video call, a file download, and a web page can share one home connection without any of them starving, and it is the reason the internet survived its own explosive growth.

Left alone, senders would overwhelm the routers between them, queues would fill, packets would be dropped, and everyone would retransmit at once, making the jam worse. This article explains how TCP avoids that spiral, from the classic algorithms of the 1980s to the modern ones running in your browser today.

Key takeaways

  • Congestion control limits how much data a sender keeps in flight, based on what the network can bear.
  • Slow start probes for capacity by doubling the sending window each round trip.
  • AIMD grows the window gently and halves it on loss, which shares bandwidth fairly.
  • Modern algorithms like BBR measure the network instead of waiting for packets to drop.
  • The right algorithm depends on the link: datacentre, broadband, and mobile all differ.

Why congestion control exists

The internet has no traffic lights. There is no central controller telling senders when to go and when to wait, so the endpoints have to work it out for themselves, using only the signals they can see: acknowledgements arriving, round-trip times stretching, and packets going missing.

In October 1986 the internet learned this the hard way. Traffic between Berkeley and the Lawrence Berkeley Laboratory collapsed to a trickle, with throughput falling by a factor of a thousand, even though the link itself was fine. The cause was congestion collapse: routers were dropping packets, senders were retransmitting them, and the retransmissions were crowding out fresh data, so the network spent its capacity carrying copies of packets that would be dropped again.

Van Jacobson fixed it in 1988 with the algorithms that still underpin TCP today: slow start and congestion avoidance. His insight was simple and has held up for nearly forty years: senders should treat a lost packet as a sign the network is full and slow down, and they should probe for spare capacity gradually rather than grabbing it all at once. Our guide to the OSI model explains where TCP sits in the stack, and our guide to BGP explains how traffic finds its path across the internet in the first place.

Slow start and the congestion window

The core idea is the congestion window, usually written cwnd, which is the number of bytes a sender may have in flight before it must wait for an acknowledgement. Every acknowledgement is both a receipt and a permission slip: it says a packet arrived, and it frees space in the window for the next one.

When a connection opens, the sender knows nothing about the path, so it starts small, with a window of just a few packets. Each round trip in which every acknowledgement arrives, the window doubles, so the sender ramps up exponentially: two packets, then four, then eight, then sixteen. This is slow start, and the name is a joke, because doubling each round trip reaches full speed in a handful of round trips.

Slow start stops when the window hits a threshold or when a packet is lost. At that point the sender switches to congestion avoidance, where the window grows by roughly one packet per round trip instead of doubling. The sender keeps probing upward, gently, until the network pushes back, and that pushback is what keeps the system stable.

AIMD: add slowly, cut sharply

Congestion avoidance follows a rule called AIMD, additive increase, multiplicative decrease. The window grows by a little on every successful round trip and is cut in half the moment a packet is lost. The asymmetry is deliberate: many senders probing upward together would overshoot badly if they all cut by only a little, while halving spreads the pain and lets the queue drain.

The beauty of AIMD is that it shares fairly without any coordination. A flow with a big window loses more packets when the queue fills, so it cuts more, while a small flow loses fewer and keeps growing. Left running, the flows converge toward an equal share of the link, even though no sender knows the others exist.

That fairness comes at a cost, and it is visible on fast, long-distance links. Halving the window on a gigabit link throws away a huge amount of capacity, and additive increase takes many round trips to win it back, so the link spends much of its time below full speed. The sawtooth pattern of the window, climbing slowly and dropping sharply, is the signature of classic TCP, and it is why newer algorithms were invented.

A photograph of a busy motorway interchange at dusk, lanes of car headlights merging and flowing in both directions
A photograph of a busy motorway interchange at dusk, lanes of car headlights merging and flowing in both directions, shows what congestion looks like when too much traffic tries to use one road at once.

Loss is not the only signal

Classic congestion control treats a lost packet as the only sign of trouble, but loss is a late signal. By the time a router drops a packet, its queue is already full, and on a shared link the queue can hold hundreds of milliseconds of data, which shows up as lag, a problem gamers and video callers know as bufferbloat.

Delay-based algorithms watch the round-trip time instead. Vegas, one of the earliest, compared the current round-trip time with the fastest ever seen, and slowed down as soon as delay started to grow, before any packet was lost. It kept queues short and latency low, but it lost out to loss-based flows, which kept pushing until packets dropped and took the bandwidth Vegas had politely left alone.

That tension explains why loss-based algorithms dominated for so long: on a shared link, politeness gets punished. Any algorithm that backs off early hands its share to a neighbour that does not, so the gentle flow ends up with the scraps. The fix had to be smarter than simply being polite.

BBR and the modern era

Google’s BBR, Bottleneck Bandwidth and Round-trip propagation time, takes a different approach: it measures the network instead of reacting to loss. It estimates the fastest the bottleneck link can deliver and the shortest round trip the path allows, then paces its packets to match exactly that rate, keeping the queue nearly empty.

The result is striking on long, fast links. Where classic TCP sawtooths between half and full speed, BBR holds steady near the top, with far lower latency, because it never fills the queue in the first place. YouTube and Google’s own services saw measurable gains when they switched, and BBR is now the default in recent Linux kernels.

BBR is not a free lunch. Early versions were criticised for being unfair to classic TCP flows sharing the same link, and later versions have worked hard to fix that, probing less aggressively and yielding more gracefully. The lesson is that congestion control is a negotiation between strangers, and every algorithm is a bet about how the others will behave. Our guide to CDNs explains how content is placed closer to users to shorten the paths involved.

Comparing congestion control algorithms

There is no single best algorithm, because networks differ so much. A datacentre link is fast, short, and almost lossless, a home broadband link is slower and shared, and a mobile link changes capacity from one second to the next as the signal fades and the cell fills.

The table below sets out the main algorithms and where each one fits.

Algorithm Signal used Behaviour Best for
Reno Packet loss Additive increase, halve on loss General purpose, legacy default
CUBIC Packet loss Cubic growth, fast recovery Fast long-distance links
Vegas Delay Backs off as delay grows Low-latency links, quiet networks
BBR Measured bandwidth and delay Paces to the bottleneck rate Video, cloud, long fat pipes
DCTCP Marked packets Fine-grained cuts on congestion marks Datacentres with ECN support

The practical result is that CUBIC remains the default almost everywhere, BBR is the choice for video and cloud traffic, and DCTCP rules inside datacentres where the switches cooperate.

TCP congestion control checklist

  • Use CUBIC as the default unless you have a measured reason to change it.
  • Try BBR for video, downloads, and long-distance traffic.
  • Measure latency under load, not just top speed, before choosing.
  • Enable ECN so routers can warn senders before dropping packets.
  • Keep buffers small on access links to fight bufferbloat.
  • Test on real mobile networks, not just the office LAN.
  • Watch for unfairness when mixing old and new algorithms.
  • Check your kernel default; it may be older than you think.
  • Revisit the choice yearly, as algorithms keep improving.

Frequently asked questions

What is TCP congestion control?

It is the set of rules that limits how much data a TCP sender keeps in flight, probing for spare capacity and backing off when the network shows strain, so senders share links without collapsing them.

What is slow start?

The opening phase of a connection, in which the sender doubles its window each round trip until it hits a threshold or loses a packet, reaching full speed in just a few round trips.

What does AIMD mean?

Additive increase, multiplicative decrease: grow the sending window a little on success and halve it on loss, which shares bandwidth fairly between competing flows.

Why is BBR different from CUBIC?

CUBIC reacts to lost packets, while BBR measures the bottleneck bandwidth and round-trip time and paces packets to match, keeping queues short and latency low.

What is bufferbloat?

Lag caused by oversized router queues that fill up before any packet is dropped, so classic loss-based control keeps sending into a queue that is already far too deep.

Can I change the congestion control algorithm?

Yes, on Linux it is a sysctl setting, and many servers and CDNs already choose BBR or CUBIC deliberately, but test first, because the best choice depends on your traffic.

The bottom line

TCP congestion control explained in one line is this: probe gently, back off sharply, and let every sender learn the network’s limits from the signals it can see.

It is the quiet algorithm that stopped the internet from collapsing in 1986 and still keeps it flowing today, and the newer algorithms are refinements of the same idea, not replacements for it.

This article is general information about how TCP congestion control works, not advice about tuning it for a particular system.

Latest articles

Scroll to Top