6 · CUBIC, delay-based control, ECN, fairness, QUIC
Slides 3-84 → 3-99 · HW4 P41 (fairness diagram) · Book 3.7–3.8
TCP CUBIC (3-84, 3-85)
- Question: is there a better way than AIMD to probe for usable bandwidth?
- Wmax = the sending rate (window) at which the last congestion loss was detected.
- Intuition: the bottleneck's congestion state probably hasn't changed much since then.
- After halving on loss: ramp back toward Wmax fast at first, then approach Wmax slowly (carefully).
- K = the point in time when the window will reach Wmax. K is tuneable.
- Cubic growth: W grows as the cube of the distance between the current time and K. Big increases far from K, small cautious increases near K. Past K it speeds up again to probe for more bandwidth.
- Book form:
W(t) = C·(t − K)³ + Wmax. - Result: higher throughput than classic Reno (spends more time near Wmax).
- CUBIC is the default in Linux and the most popular TCP for popular Web servers.
The bottleneck link (3-86, 3-87)
- Classic TCP and CUBIC both raise the rate until loss at some router's output: the bottleneck link.
- The bottleneck is almost always busy. Its queue is almost never empty and sometimes overflows (loss).
- Insight 1: once the bottleneck is congested, sending faster does not raise end-to-end throughput. Throughput can't exceed the bottleneck rate.
- Insight 2: sending faster only fills the queue, which raises the measured RTT (more delay).
- Goal: "keep the end-end pipe just full, but not fuller".
Delay-based congestion control (3-88 → 3-90)
- Idea: keep the bottleneck busy, but avoid high delays and buffering.
- RTTmin = the minimum observed RTT, which is the RTT of the uncongested path.
- Uncongested throughput with window cwnd =
cwnd / RTTmin. - Measured throughput =
(bytes sent in the last RTT) / RTTmeasured. - Measured ≈ uncongested → the path is not congested → increase cwnd linearly.
- Measured far below uncongested → the path is congested → decrease cwnd linearly.
- Congestion control without forcing loss: max throughput, low delay.
- BBR (Google) takes this approach and runs on Google's internal backbone.
Explicit congestion notification, ECN (3-91)
- Network-assisted congestion control: the routers help.
- Two bits in the IP header (ToS field) are marked by a router to signal congestion. The network operator picks the marking policy.
- The source sends
ECN = 10(ECN-capable). A congested router changes it toECN = 11. - The receiver sees the mark and sets the ECE bit in the TCP header of its ACK to tell the sender.
- The sender halves cwnd (as it would for a 3-dup-ACK loss) and sets the CWR (congestion window reduced) bit in its next segment.
- ECN uses both IP (ECN bits) and TCP (C and E bits).
Fairness (3-92 → 3-94)
- Goal: if K TCP sessions share one bottleneck link of bandwidth R, each should average R/K.
- Diagram: connection 1 throughput on x, connection 2 on y. Two lines matter: the equal-share line (x = y) and the full-bandwidth line (x + y = R).
- Additive increase moves the point at slope 1 (45°): both gain equally.
- Multiplicative decrease moves it straight toward the origin: both lose in proportion. This halves the gap between them.
- Repeat and the point converges to where the two lines cross: R/2 each. (AIAD never converges; see HW4 P41 on page 5.)
- Is TCP fair? Yes, under idealized assumptions: same RTT, fixed number of sessions, all in congestion avoidance. Shorter-RTT connections grab more in practice.
Apps that aren't fair (3-94)
- UDP: multimedia apps often skip TCP so their rate isn't throttled. They send at a constant rate and tolerate loss. UDP has no congestion control, and there is no "Internet police".
- Parallel TCP connections: an app (like a web browser) can open several connections between two hosts and get a bigger share.
How to solve: share with parallel connections
Q (slide 3-94): A bottleneck link of rate R already carries 9 TCP connections. A new app starts using the link, and every connection gets an equal share.
- (a) What rate does the new app get if it opens 1 TCP connection?
- (b) What rate does it get if it opens 11 parallel TCP connections?
- Count all connections on the link: existing n plus the new app's m.
- Each connection gets
R / (n + m). - The new app gets
m · R / (n + m).
Slide 3-94: link R, 9 existing connections new app opens 1: 1 · R/(9+1) = R/10 new app opens 11: 11 · R/(9+11) = 11R/20 ≈ R/2
Evolving transport (3-95)
- TCP and UDP have been the main transport protocols for 40 years. TCP has "flavors" for special cases:
| Scenario | Challenge |
|---|---|
| Long, fat pipes | Many packets in flight; a loss shuts down the pipeline |
| Wireless | Loss from noise or mobility, which TCP wrongly treats as congestion |
| Long-delay links | Extremely long RTTs |
| Data centers | Latency sensitive |
| Background flows | Low-priority TCP flows |
- Trend: move transport functions up to the application layer, on top of UDP. Example: HTTP/3 over QUIC.
QUIC: Quick UDP Internet Connections (3-96 → 3-99)
- Application-layer protocol on top of UDP. Built to speed up HTTP. Deployed on many Google servers and apps (Chrome, mobile YouTube).
- Stack: HTTP/2 over TLS over TCP → HTTP/3 over QUIC over UDP.
- Reuses the chapter's ideas for connection setup, error control, and congestion control. Its loss detection and congestion control parallel TCP's.
- One handshake (3-98): reliability, congestion control, authentication, encryption, and state are all set up in 1 RTT. TCP + TLS needs 2 serial handshakes.
- Streams (3-97): multiple application-level streams are multiplexed over one QUIC connection. Each stream has its own reliable data transfer and security. All streams share common congestion control.
- No head-of-line (HOL) blocking (3-99): over TCP, one lost segment stalls every HTTP request behind it. In QUIC, a loss only stalls its own stream; the others keep delivering.
Traps
• QUIC is application layer, not a new transport protocol. It runs over UDP.
• QUIC streams: separate reliability, shared congestion control (3-97). Don't say congestion control is per stream.
• ECN: the router marks the IP header; the receiver sets ECE in the TCP ACK; the sender reacts and sets CWR. Routers don't talk to the sender directly.
• CUBIC ramps fast far from Wmax and slow near it. Not the other way around.
• Delay-based compares measured throughput to
• Pushing past the bottleneck adds delay, not throughput.
• TCP fairness needs equal RTTs. UDP and parallel connections break it.
• QUIC is application layer, not a new transport protocol. It runs over UDP.
• QUIC streams: separate reliability, shared congestion control (3-97). Don't say congestion control is per stream.
• ECN: the router marks the IP header; the receiver sets ECE in the TCP ACK; the sender reacts and sets CWR. Routers don't talk to the sender directly.
• CUBIC ramps fast far from Wmax and slow near it. Not the other way around.
• Delay-based compares measured throughput to
cwnd/RTTmin. It decreases before any loss.• Pushing past the bottleneck adds delay, not throughput.
• TCP fairness needs equal RTTs. UDP and parallel connections break it.
Quick check
1. What is Wmax in CUBIC, how does CUBIC grow toward it, and where is it the default?
The window at which the last loss happened. CUBIC grows fast when far from Wmax, slowly near it (cube of the time distance to K). Default TCP in Linux.2. Why does CUBIC get more throughput than Reno?
After a loss it returns to near Wmax quickly and stays there, instead of climbing back at +1 MSS per RTT.3. The bottleneck link is already congested. You double your sending rate. What happens to throughput and RTT?
Throughput stays about the same (it's capped by the bottleneck). RTT goes up, because the extra packets sit in the queue.4. Delay-based: cwnd = 30,000 bytes, RTTmin = 100 ms, measured RTT = 150 ms (all 30,000 bytes sent in the last RTT). Increase or decrease cwnd?
uncongested = 30,000 × 8 / 0.100 = 2.4 Mbps measured = 30,000 × 8 / 0.150 = 1.6 MbpsMeasured is far below uncongested (only 2/3) → path congested → decrease cwnd linearly. (This is the idea behind Google's BBR.)
5. Same as #4, but measured RTT = 102 ms. Increase or decrease?
Measured = 240,000 / 0.102 ≈ 2.35 Mbps, very close to 2.4 Mbps → not congested → increase cwnd linearly.6. ECN: who sets which bit?
A router marks the 2 ECN bits in the IP header (10 → 11). The receiver sets ECE in the TCP ACK. The sender halves cwnd and sets CWR.7. A link of rate R has 4 existing connections. A new app opens 6 parallel TCP connections. What share does it get?
6 · R/(4 + 6) = 0.6R. (With 1 connection it would get R/5 = 0.2R.)8. In the fairness diagram, what do AI and MD do to the operating point?
AI moves it at slope 1 (both +1). MD moves it toward the origin, halving the gap. Together they converge to the equal-share line at R/2 each.9. Name three things that make TCP fairness fail in practice.
Different RTTs, apps using UDP (no congestion control), apps opening parallel TCP connections.10. What layer is QUIC, and what runs on top of it?
Application layer, over UDP. HTTP/3 runs on top of it.11. How many handshakes does QUIC need vs TCP + TLS?
QUIC: 1 (reliability, congestion, auth, crypto together). TCP + TLS: 2 serial.12. What is HOL blocking, and how does QUIC avoid it?
Over one TCP connection, a lost segment stalls every request queued behind it. QUIC gives each stream its own reliable delivery, so a loss only stalls that stream.← prev · all topics · next →