Skip to content

Lesson 5 of 9 · 27m

Congestion Control in Practice: Slow Start, CUBIC, BBR, and Queueing

What TCP congestion control is optimizing, how slow start and congestion avoidance shape throughput, and why latency under load is often a queueing problem rather than raw bandwidth shortage.

Congestion control is TCP’s answer to a hard collective problem: every sender wants maximum throughput, but unmanaged sending turns bottleneck links into standing queues and loss. The important mental shift is that congestion control is not mainly about fairness to your application. It is about preventing the network from destroying itself when many independent senders have imperfect information.

Slow start is exponential, then restrained

A new connection starts with a small congestion window, often around ten maximum-sized segments. Every ACK that advances the window lets the sender grow it rapidly. This ramp is aggressive because idle capacity should be found quickly, but it is still bounded by loss and receiver advertisements.

initial cwnd: 10 segments
after 1 RTT: roughly 20
after 2 RTT: roughly 40
after loss or threshold: congestion avoidance

This is why short TCP connections are disproportionately sensitive to round-trip time. They may never leave slow start before they finish.

Congestion avoidance probes carefully

After slow start, algorithms such as CUBIC grow more cautiously. Classic loss-based TCP interprets packet loss as congestion evidence and cuts the sending rate. CUBIC is the common Linux default because it performs well on high-bandwidth, high-delay paths without being tied too tightly to RTT.

sysctl net.ipv4.tcp_congestion_control
ss -tin | grep -A1 ESTAB

ss -tin can show congestion window, RTT, retransmissions, and pacing information for live sockets. That is often faster than opening a capture.

BBR models the path instead of only reacting to loss

BBR tries to estimate bottleneck bandwidth and minimum round-trip time, then pace traffic near that operating point. Its goal is high throughput without filling every queue. It is not magic and it is not universally appropriate, but it demonstrates the modern insight: loss is a noisy congestion signal, especially when queues are deep.

Bufferbloat makes bandwidth look healthy while latency dies

A bottleneck router with an oversized queue can accept packets for hundreds of milliseconds before dropping them. Throughput tests may look fine while interactive traffic becomes miserable.

ping -c 20 192.0.2.1
# then repeat while a large upload is running

If RTT inflates only under load, suspect queueing. Active queue management such as fq_codel or CAKE often matters more than buying a larger nominal circuit.

Throughput is one outcome, not the system

The same congestion controller can produce different results depending on RTT, loss pattern, queue depth, packet pacing, receive window, application write size, and TLS or proxy termination. Never benchmark a single bulk transfer and declare the network fixed. Test latency under load, small request latency, and concurrent flow behavior.

Field notes

  • Congestion window is sender state; receive window is receiver credit. They are separate limits.
  • One loss event is not proof of congestion; wireless and corrupted frames also lose packets.
  • “Bandwidth is unused” can coexist with an application stall if cwnd, rwnd, or application writes are small.
  • Middleboxes that terminate TCP hide the end-to-end congestion-control story.
  • fq_codel and CAKE are queueing disciplines, not bandwidth multipliers; they keep delay bounded by controlling queues.

Was this lesson helpful?

Sign in to rate