Loading content...
A skilled physician can diagnose many conditions by taking a patient's pulse—subtle variations in rhythm, strength, and timing reveal underlying pathology. Similarly, TCP must diagnose network health using only the "pulse" of acknowledgments and timing patterns.
Unlike a physician who can order tests and examination, TCP cannot probe the network directly. It can only observe symptoms: packets that don't arrive, packets that arrive late, and occasionally, explicit markers left by routers along the way.
The art of congestion control lies in correctly interpreting these symptoms. Treat every slight delay as congestion, and TCP starves itself of bandwidth. Ignore clear warning signs, and TCP drives the network into collapse. Finding the right balance requires understanding what each signal means, how reliable it is, and when it might be misleading.
By the end of this page, you will understand the three primary congestion signals (loss, delay, ECN), how TCP interprets each, the reliability and pitfalls of each signal type, and how modern congestion control algorithms combine multiple signals for better accuracy.
Packet loss is the most fundamental and historically primary congestion signal in TCP. When routers become overloaded and their buffers fill, they have no choice but to discard incoming packets. This drop is the network's way of saying "I cannot handle this load."
The Logic:
In a properly designed network:
By treating drops as congestion, TCP can adapt: detect loss, reduce sending rate, allow the network to recover.
| Mechanism | How It Works | Detection Time | Reliability |
|---|---|---|---|
| Timeout (RTO) | No ACK received within RTO period | Slow (typically 200ms-2s) | Definitive but delayed |
| Triple Duplicate ACK | Same ACK received 3+ times | Fast (3 packets after gap) | Usually accurate |
| SACK Information | SACK blocks show holes in received data | Fast (first SACK after gap) | Very accurate, shows pattern |
| RACK (Recent ACK) | Uses timestamps and reordering window | Fast, adaptive | Handles reordering well |
Timeout-Based Detection:
If no acknowledgment arrives within the Retransmission Timeout (RTO) period, TCP assumes the segment was lost. The RTO is calculated from measured RTT with safety margins:
RTO = SRTT + 4 × RTTVAR
Where:
Timeout is the "last resort" detection method—reliable but slow. Modern TCP uses faster mechanisms when possible.
Triple Duplicate ACK Detection:
When a receiver gets out-of-order data, it immediately ACKs the last in-order byte. If segment 5 is lost but 6, 7, 8 arrive, the receiver sends:
These are "duplicate ACKs." Three duplicates strongly suggest loss (not just reordering), triggering fast retransmit without waiting for timeout.
Not all packet loss is congestion. Wireless links, electrical interference, bit errors, and routing transients cause drops without overload. TCP's assumption that loss = congestion can dramatically reduce throughput on lossy links. This is why cellular networks use link-layer retransmission to hide random losses from TCP.
While packet loss is an unambiguous signal that something happened, interpreting it correctly poses several challenges:
Problem 1: Loss Happens After Congestion
By the time a packet is dropped:
Dropping is a lagging indicator. The network was already stressed before the drop occurred, and significant data has already queued up.
Problem 2: Multiple Causes
Packet loss can result from:
TCP cannot distinguish these causes from observation alone.
Problem 3: The Sensitivity Trade-off
How should TCP respond to a single loss event?
Conservative interpretation: One loss = mild congestion. Reduce rate moderately. Risk: If it WAS serious congestion, this under-reacts, causing more drops.
Aggressive interpretation: One loss = serious congestion. Cut rate dramatically. Risk: If it was random loss, this over-reacts, wasting capacity.
Classic TCP takes the aggressive approach (halve cwnd), which works well in wired networks where nearly all loss IS congestion. But it performs poorly where random loss is common.
Problem 4: Burst Losses
When a router's buffer overflows, multiple consecutive packets may be lost (a "burst" or "cluster"). This creates challenges:
Modern thinking increasingly views loss as 'already too late' for congestion control. By the time packets drop, queues are full, latency is high, and the network is already stressed. Better approaches detect and react to impending congestion before loss occurs.
Delay (specifically, delay increase) provides an earlier congestion indicator than loss. When traffic approaches capacity, queues build at bottlenecks, increasing packet delay. This queuing happens before buffers overflow—potentially well before.
The Principle:
Consider a path with some minimum delay (propagation + minimum processing). When congestion develops:
Stage 1: Light Load
Stage 2: Increasing Load
Stage 3: Heavy Load
Stage 4: Overload
Delay-based approaches detect Stage 2 or 3, reacting before Stage 4.
Measuring Delay:
TCP tracks RTT through various mechanisms:
Without Timestamps: Measure time from sending a segment to receiving its ACK. Limited by:
With TCP Timestamps (RFC 1323):
Delay Variation:
Beyond absolute delay, the variation in delay carries information:
Delay signals work best with small or moderate buffers. With huge buffers (bufferbloat), queuing delay can be enormous (seconds!) before loss occurs. Delay-based CC can maintain low latency by keeping queues short, but it must be able to distinguish queuing delay from path delay.
Several TCP variants and congestion control algorithms use delay as their primary or a contributing congestion signal.
TCP Vegas (1994):
The first major delay-based TCP variant. Vegas compares actual throughput to expected throughput:
Expected = cwnd / RTT_min Actual = cwnd / RTT_current Diff = Expected - Actual
Interpretation: If actual throughput is close to expected (based on minimum RTT), the queue is empty. If actual is notably lower, packets are waiting in queues.
| Algorithm | Key Mechanism | Strengths | Weaknesses |
|---|---|---|---|
| TCP Vegas | Expected vs actual throughput | Low queuing delay, efficient | Loses to loss-based flows |
| TCP LEDBAT | One-way delay variation | Designed to be low-priority | Very conservative |
| FAST TCP | Delay difference from min | Fast convergence, data centers | Needs accurate measurements |
| Copa | Delay oscillation pattern | Low latency, self-tuning | Complex, still evolving |
| BBR | Max BW and min RTT model | High throughput AND low delay | Fairness concerns v1, improved v2 |
BBR's Approach (2016):
Google's BBR represents a sophisticated evolution of delay-based thinking:
Model the network: Estimate bottleneck bandwidth (max delivery rate) and minimum RTT (when path is empty)
Target optimal operating point: BDP = BW_max × RTT_min. Keep exactly this much data in flight.
Probe periodically: Occasionally increase rate to check if capacity increased (BW probing) or decrease rate to let queue drain and measure true RTT_min (RTT probing)
Control via pacing rate: Rather than just cwnd, pace packets at the estimated bottleneck rate
BBR aims to operate at the inflection point—high throughput with minimal queuing. It largely ignores loss as a congestion signal (within limits), making it robust to non-congestion losses.
The Delay-Based Challenge:
The fundamental issue: delay-based algorithms back off when queues build. But loss-based algorithms keep pushing until drops occur. When they compete:
This "compete against loss-based flows" problem has hindered pure delay-based adoption.
A congestion control algorithm isn't deployed in isolation. It must perform well alongside existing algorithms in the wild Internet. Delay-based algorithms that lose badly to standard TCP cannot be deployed widely, regardless of their theoretical benefits.
Explicit Congestion Notification (ECN) represents a paradigm shift: rather than inferring congestion from its symptoms, have routers explicitly signal when congestion is developing.
The Problem ECN Solves:
With loss-based signaling:
With ECN:
ECN Mechanics:
ECN uses bits in the IP header (IP ECN field) and TCP header (ECN flags):
IP Header (2 bits):
TCP Header (2 flags):
Process:
| Benefit | Mechanism | Requirements |
|---|---|---|
| Earlier signal | Mark before buffer full | AQM (active queue management) at routers |
| No retransmission | Packets marked, not dropped | Both endpoints must support ECN |
| Lower latency | Can keep queues shorter | Routers must implement ECN marking |
| Better for short flows | Avoid timeout for small transfers | Negotiation adds 0 overhead if unused |
| Reduced loss rate | Only random/error losses remain | Must be enabled (OS default varies) |
ECN has been standardized since 2001 but adoption was slow due to buggy middleboxes that dropped ECN-marked packets. Modern networks are more ECN-friendly. Apple enables ECN by default on iOS/macOS. Data centers use ECN extensively (DCTCP, DCQCN). L4S (Low Latency, Low Loss, Scalable throughput) builds on ECN for next-generation congestion control.
Modern congestion control increasingly recognizes that no single signal is perfect. The best approaches combine multiple signals, using each where it's most informative.
The Signal Spectrum:
| Signal | When Most Useful | Weakness |
|---|---|---|
| Loss | Definitive congestion indication | Too late, lagging |
| Delay | Early warning | Ambiguous, path changes |
| ECN | Explicit, timely | Requires network support |
Hybrid Examples:
CUBIC + HyStart: CUBIC is loss-based but uses HyStart (Hybrid Slow Start) for early phases:
BBR's Multi-Signal Approach:
L4S: The Future Direction
Low Latency, Low Loss, Scalable throughput (L4S) is an emerging architecture that uses ECN as the primary signal:
L4S requires:
This represents the trajectory of congestion signaling: from occasional binary signals (drop/don't drop) to continuous, proportional feedback (marking rate ∝ congestion level).
A congestion signal is only useful if it accurately reflects network state. Noisy signals cause erratic behavior; delayed signals cause oscillation; ambiguous signals cause suboptimal decisions. The evolution of congestion control is largely the evolution of better, timelier, more precise signals.
Even with good signals, correct interpretation is challenging. TCP must make decisions under uncertainty, balancing responsiveness against stability.
Challenge 1: Distinguishing Cause from Effect
If RTT increases, is it because:
TCP cannot directly distinguish these. It must use heuristics (did my rate recently increase? did loss accompany the delay?).
Challenge 2: How Much to React
Upon detecting congestion, by how much should cwnd decrease?
Classic TCP uses "multiplicative decrease" (halve cwnd)—a conservative choice that may over-react to mild congestion but safely addresses severe congestion.
| Observation | Possible Causes | Typical Interpretation |
|---|---|---|
| Single packet loss | Congestion, bit error, random drop | Usually treat as congestion (fast retransmit) |
| Timeout | Severe congestion, route failure, blackhole | Assume severe congestion (max backoff) |
| RTT increase | Queuing, path change, receiver delay | Often treat as congestion (delay-based CC) |
| Burst of losses | Buffer overflow, path failure | Severe congestion response |
| Duplicate ACKs (1-2) | Reordering | Wait, don't retransmit yet |
| ECN marks | Queue building at router | Reduce rate (clear signal) |
Challenge 3: Noise and Variability
Real network measurements are noisy:
Algorithms must filter noise from signal:
Challenge 4: Competing Flows
Congestion signals reflect aggregate network state, not just your flow. If RTT increases:
The AIMD approach (we'll see on Page 5) elegantly handles this by having all flows reduce multiplicatively upon any congestion signal, naturally leading to fair convergence.
TCP operates under fundamental uncertainty about network state. No matter how sophisticated the algorithm, it's making probabilistic inferences from limited, delayed observations. Robust congestion control must perform reasonably well even when its inferences are wrong.
We've developed a comprehensive understanding of how TCP detects congestion. Let's consolidate the key insights:
What's Next:
With signals in hand, TCP must decide how to respond. The next page explores the AIMD principle—Additive Increase, Multiplicative Decrease—the foundation of TCP's response strategy and the key to distributed fairness.
You now understand the signals TCP uses to detect congestion—loss, delay, and ECN—their strengths, limitations, and how modern algorithms combine them. This prepares you to understand not just WHAT signals TCP receives, but HOW it responds to achieve efficient, fair, stable network sharing.