Computer Networking › Section C · The transport layer › Topic C.6
Principles of congestion control
When too many senders push too much data through the same links, queues swell, packets are dropped and retransmissions make things worse. Understanding why congestion is so costly explains why every serious transport protocol must slow down when the network is overloaded.
What congestion is
A network is congested when senders together offer more traffic than some link can carry. Packets then wait in the router's output buffer, and when the buffer is full, new arrivals are dropped. Lost packets are a symptom; the cause is too much traffic. Reliable data transfer, from the topic Principles of reliable data transfer, repairs the symptom by retransmitting, but retransmission adds traffic and does nothing about the cause. Congestion control is the job of reducing the sending rate when the network is overloaded. It is different from flow control, which matches one sender to one receiver's buffer: a fast receiver does not help if a link in the middle is swamped.
A warning from history
This is not a theoretical worry. In October 1986 the early internet suffered a series of congestion collapses. Van Jacobson reported that throughput between Lawrence Berkeley Laboratory and the University of California, Berkeley, two sites a few hundred metres apart, fell from about 32 kbps to about 40 bps, a drop by a factor of roughly 800. Hosts kept retransmitting into full queues, so links were busy carrying copies that were then dropped. In 1988 Jacobson and Michael Karels published congestion-control algorithms for TCP, the basis of the methods in the topic TCP congestion control, and they have kept the internet stable as it has grown.
Cost 1: delay grows as load nears capacity
Start with the gentlest case: two identical senders share one router link of capacity R, and the router's buffer is unlimited, so nothing is ever lost. Each sender's throughput rises with its sending rate, but together they cannot exceed R, so each gets at most R/2. The price is delay. As the combined rate approaches R, packets spend longer and longer in the queue, and if the senders offer more than R the queue, and the delay, grow without limit. Running a link close to full capacity looks efficient, but users experience it as a slow network.
Worked example: a full buffer
A router's 10 Mbps output link has a buffer that holds 500 packets of 1,250 bytes each. How much delay does a full buffer add? 1. Each packet is \(1{,}250 \times 8 = 10{,}000\) bits. 2. The buffer holds \(500 \times 10{,}000 = 5 \times 10^6\) bits. 3. Draining it at \(10^7\) bits per second takes \(5 \times 10^6 / 10^7 = 0.5\) s. 4. A packet arriving at the back of a full queue therefore waits about half a second before it is even sent. Check: half a second on top of the normal RTT makes a video call unusable. Large buffers filled by heavy flows cause this delay, often called bufferbloat.
Cost 2: retransmissions waste capacity
Now give the router a finite buffer, so packets are dropped when it is full and reliable senders retransmit them. The rate at which the receiver gets new, useful data is the goodput, and it falls below the sending rate because part of every link's capacity carries repeats. It gets worse when timers fire too early. A sender that times out while its packet is merely stuck in a long queue resends a packet that would have arrived anyway. The router then forwards two copies, and the receiver throws one away. Both needed and unneeded retransmissions use link capacity that could have carried new data.
Worked example: goodput
Two senders share a 10 Mbps bottleneck equally, so each sends 5 Mbps. 1. If one packet in five that a sender transmits is a retransmission of a dropped packet, only four in five carry new data, so goodput is \(5 \times 4/5 = 4\) Mbps. 2. Suppose instead that premature timeouts make every packet cross the link twice on average. Goodput halves to \(5 / 2 = 2.5\) Mbps, although the link is just as busy. 3. Compare: the link carries 10 Mbps in both cases, but useful delivery falls from 8 Mbps to 5 Mbps in total. Check: a link at full capacity can still deliver little useful data, which is exactly what congestion collapse looks like.
Cost 3: wasted work upstream
Real paths cross several routers. Suppose a packet travels over one link, is queued at the next router and is dropped there because that router is congested by other traffic. Every link it crossed before the drop did work for nothing: that transmission capacity could have carried a packet that would have arrived. When several routers are congested and flows cross each other's paths, heavy offered load can push the useful throughput of a flow towards zero, as upstream links fill with packets that will die downstream. This is how a network collapses: busier and busier, delivering less and less.
Approach 1: end-to-end control
There are two broad ways to control congestion. In end-to-end congestion control, the network layer gives senders no explicit help, and each host infers congestion from what it observes: lost segments, detected by timeouts or duplicate ACKs, or rising round-trip delays as queues build. The host then lowers its rate. IP was designed without congestion feedback, so classic TCP has to work this way, treating loss as its main signal. It needs nothing from routers and works over any path, but it reacts only after congestion has already caused loss or delay.
Approach 2: network-assisted control
In network-assisted congestion control, routers tell senders directly. The feedback can take the form of a choke packet sent from the router to the source, or a mark set in a packet heading to the receiver, which then informs the sender; the second route takes at least a full round trip. Some designs, such as ATM's available-bit-rate service, let switches state the exact rate a sender may use. On today's internet, the main example is Explicit Congestion Notification (ECN), standardised in RFC 3168: a router whose queue is building sets two bits in the IP header instead of dropping the packet, and the receiver echoes the warning back to the sender in TCP.
Common mistakes to avoid
First, treating packet loss as the cause of congestion; it is a symptom of too much traffic. Second, assuming bigger buffers cure congestion; they trade loss for long delays. Third, confusing congestion control, which protects the network, with flow control, which protects the receiver. Fourth, thinking a fully used link must be delivering useful data; retransmitted copies and doomed packets also fill it. Fifth, assuming routers always help; on the classic internet, hosts must infer congestion themselves.
Key takeaways
Congestion happens when offered traffic exceeds a link's capacity: queues grow, delays rise and packets are dropped. Its costs are large queueing delays near capacity, retransmissions that cut goodput, unneeded retransmissions after premature timeouts, and upstream capacity wasted on packets dropped downstream. Unchecked, these lead to congestion collapse, as in 1986. End-to-end control infers congestion from loss or delay, as classic TCP does; network-assisted control gets explicit signals from routers, such as ECN marks.
Flashcards
Flashcard
Offered traffic exceeds a link's capacity
Test your understanding
Question 1 of 5
A router's 50 Mbps link has a buffer of 2,000 packets of 1,500 bytes. About how long does a full buffer take to drain?
Question 2 of 5
A sender transmits at 8 Mbps, but one packet in four is a retransmission. What is its goodput?
Question 3 of 5
Why are premature timeouts especially wasteful in a congested network?
Question 4 of 5
How does classic TCP learn that the network is congested?
Question 5 of 5
Which statement about Explicit Congestion Notification is correct?
