Computer Networking › Section C · The transport layer › Topic C.8
Evolution of the transport layer: QUIC
TCP and UDP date from around 1980, but the transport layer has not stood still. QUIC rebuilds reliable, secure transport on top of UDP for the modern web, and new congestion-control algorithms, CUBIC and BBR, now set the pace of most internet traffic.
Why the transport layer kept changing
Many TCP variants exist, for wireless links, data centres and very fast paths; Multipath TCP (RFC 8684) even spreads one connection over Wi-Fi and cellular at once. Changing TCP itself is slow, though. It lives in operating-system kernels, and middleboxes such as firewalls and NAT boxes often drop segments that look unfamiliar. This freezing of a protocol by the equipment around it is called ossification. QUIC sidesteps it by running over UDP, which most middleboxes pass, and by encrypting nearly everything they might otherwise interfere with.
QUIC in outline
QUIC began at Google in about 2012 and was standardised by the IETF in May 2021 as RFC 9000, with RFC 9001 describing how it uses TLS and RFC 9002 its loss detection and congestion control. HTTP/3, the version of HTTP that runs over QUIC, followed as RFC 9114 in June 2022. QUIC runs over UDP, usually in a library inside the application rather than in the kernel, so it updates as quickly as a browser. It is connection-oriented and always encrypted with TLS 1.3. It provides reliable delivery and TCP-style congestion control, using the principles of this section, but organises data into multiple independent streams.
Faster connection setup
A secure web connection over TCP needs two handshakes in turn: TCP's own, then TLS. With TLS 1.3 that is one RTT for each, so the client can send its HTTP request only after two round trips. QUIC merges the transport and cryptographic handshakes, so a new connection needs just one RTT before the request goes out. When a client reconnects to a server it has used recently, QUIC can send application data in its very first packet, a 0-RTT start. One caution: 0-RTT data can be replayed by an attacker, so it is meant only for requests that are safe to repeat, such as fetching a page.
Worked example: time to first response
A client is 80 ms RTT from a server and fetches one small page. Ignore DNS, transmission and processing times. 1. TCP with TLS 1.3: the TCP handshake takes one RTT, the TLS handshake another, and the request and response a third, so the response arrives after \(3 \times 80 = 240\) ms. 2. QUIC on a new connection: one RTT for the combined handshake and one for the request and response, so \(2 \times 80 = 160\) ms. 3. QUIC with 0-RTT: the request travels with the first packet, so the response arrives after one RTT, 80 ms. Check: against a fresh TCP and TLS connection, QUIC saves one RTT, and two with 0-RTT.
Streams and head-of-line blocking
A web page needs many objects at once. HTTP/2 multiplexes them over one TCP connection, but TCP sees only a single byte stream. If one segment is lost, TCP holds back every later byte until the retransmission arrives, even bytes belonging to other objects that arrived safely. This is head-of-line blocking: one loss stalls everything queued behind it. QUIC instead gives each object its own stream, with reliable, in-order delivery within the stream but none between streams. A lost packet delays only the streams whose data it carried, while the others carry on.
Worked example: one loss, three objects
A page loads a stylesheet, a script and an image together, and one packet carrying part of the script is lost; resending it takes about one RTT. 1. HTTP/2 over TCP: all three objects share one byte stream, so the stylesheet and image stall for about one RTT although their data arrived. 2. HTTP/3 over QUIC: each object has its own stream. 3. Only the script's stream waits for the retransmission. 4. The other two are delivered at once. Check: the loss costs one RTT for one object instead of for three, which is why QUIC helps most on lossy links.
Connection IDs and migration
A TCP connection is identified by its four-tuple, as the topic Multiplexing and demultiplexing explains, so if a phone moves from Wi-Fi to cellular and its IP address changes, every TCP connection breaks. QUIC packets carry connection IDs instead. The server recognises the connection by its ID, whatever address the packet comes from, so the connection survives the switch, after a quick check that the new path works; this is connection migration. QUIC also encrypts its packet numbers and acknowledgements, so middleboxes cannot read or tamper with them.
CUBIC
Reno's additive increase of 1 MSS per RTT is far too slow on fast, long paths: refilling a window of thousands of segments after a halving could take many minutes. CUBIC, standardised in RFC 9438 in August 2023, is the default TCP algorithm in Linux, Windows and Apple systems. At a loss it records the window as \(W_{\max}\) and cuts cwnd to \(0.7\,W_{\max}\) rather than half, then grows cwnd as a cubic function of the time t since the loss:
W is in segments, t in seconds, and K is the time needed to climb back to \(W_{\max}\). Growth is fast at first, flattens near \(W_{\max}\), where the last loss happened, and then accelerates again to probe for new capacity. Because it depends on time rather than ACKs, it is fairer to flows with long RTTs.
Worked example: CUBIC after a loss
A CUBIC flow loses a packet at \(W_{\max} = 100\) segments. 1. cwnd falls to \(0.7 \times 100 = 70\). 2. K, the time to climb back to \(W_{\max}\), solves \(0.4K^3 = 30\), so \(K = \sqrt[3]{75} \approx 4.22\) s. 3. At t = 1 s, \(W = 0.4(1 - 4.22)^3 + 100 \approx 86.7\). 4. At t = 3 s, \(W \approx 99.3\), creeping up to 100 at 4.22 s. 5. At t = 6 s, \(W \approx 102.3\), past the old peak and accelerating. Check: half of the 30-segment gap was regained in under 1 second, and the last few segments took about 3 seconds, so CUBIC lingers near the old peak.
BBR
Loss-based algorithms such as Reno and CUBIC fill router buffers until packets drop, causing long queueing delays. BBR, published by Google engineers in 2016, takes another approach. It measures the path's bottleneck bandwidth, the highest delivery rate recently seen, and its minimum RTT, then paces packets at about the bottleneck rate while keeping roughly one bandwidth-delay product in flight. For 50 Mbps and 40 ms, that is \(5 \times 10^7 \times 0.04 = 2 \times 10^6\) bits, or 250,000 bytes. Google uses BBR for much of its own traffic, and its third version is an IETF Internet-Draft, not yet an RFC, as of November 2026. Early versions could take more than a fair share against CUBIC, which later versions address by reacting more to loss.
Common mistakes to avoid
First, calling QUIC unreliable because it runs over UDP; QUIC itself provides reliability and congestion control. Second, thinking QUIC removes all head-of-line blocking; data within one stream is still delivered in order. Third, treating 0-RTT data as safe for every request; it can be replayed. Fourth, assuming CUBIC halves cwnd like Reno; it cuts to 0.7. Fifth, describing BBR as loss-based; it models bandwidth and RTT.
Key takeaways
TCP changes slowly because it lives in kernels and is ossified by middleboxes. QUIC (RFC 9000, May 2021) runs over UDP, usually in user space, with built-in TLS 1.3; HTTP/3 (RFC 9114, June 2022) uses it. It needs 1 RTT to set up, or 0 RTT on resumption; it has independent streams that avoid head-of-line blocking between objects; and its connection IDs allow migration. CUBIC (RFC 9438) cuts cwnd to 0.7 and regrows it along a cubic curve. BBR paces at the measured bottleneck rate, keeping about one bandwidth-delay product in flight.
Flashcards
Flashcard
Middleboxes and kernels make a protocol hard to change
Test your understanding
Question 1 of 5
A client is 60 ms RTT from a server. Ignoring other delays, when does the first response arrive over a new QUIC connection?
Question 2 of 5
Over HTTP/2 on TCP, a packet carrying part of one image is lost. What happens to the other objects on the same connection?
Question 3 of 5
Why does a QUIC connection survive a phone's switch from Wi-Fi to cellular when a TCP connection does not?
Question 4 of 5
A CUBIC flow detects a loss when cwnd is 200 segments. What is cwnd just after the reduction?
Question 5 of 5
A BBR flow measures a bottleneck bandwidth of 100 Mbps and a minimum RTT of 20 ms. About how much data does it aim to keep in flight?
