§3.8Evolution of Transport-Layer Functionality (QUIC)

Transport layer Kurose & Ross pp. 279–281 · ~15 min read

  • quic
  • quic stream
  • http/3

Where you are

  • Application layer
  • Transport layer you are here
  • Network layer
  • Link layer
  • Physical layer

When neither UDP (User Datagram Protocol) nor TCP (Transmission Control Protocol) quite fits, you can build what you need in the application layer instead — and QUIC (Quick UDP Internet Connections) is what happens when someone does that seriously.

Words you will meet

  • QUIC — Quick UDP Internet Connections: an application-layer protocol that does TCP’s job.
  • QUIC stream — one independent, reliably delivered flow inside a QUIC connection.
  • Connection ID — what identifies a QUIC connection, carried in every packet header.
  • HTTP/3 — the version of HTTP (HyperText Transfer Protocol) built on QUIC rather than TCP.

Why this matters

This is the last teaching section of the chapter, and a good place to end. QUIC uses nearly everything the chapter built — reliable data transfer, congestion control, connection management — assembled somewhere the chapter did not expect.

It also closes two accounts opened in chapter 2. Section 2.2.5 described head-of-line blocking and section 2.2.6 showed HTTP/2 solving it within a connection while leaving the TCP-level problem untouched. QUIC finishes the job.

There is no longer “the” TCP

Three decades of experience has found circumstances where neither UDP nor TCP is ideally suited, and transport-layer design has kept evolving.

There is no longer "the" TCP
Built for

Cells marked ⓘ have an explanation — click to read it. Sortable columns have a ↕ in the heading.

A selection of the versions the book names, and what each was built for.

A remarkable sentence about the Internet’s most important protocol

The book puts it plainly: it is probably not even correct anymore to refer to “the” TCP protocol. Perhaps the only features they all share are the segment format of Figure 3.29, and an obligation to compete fairly with one another in the face of congestion.

That second condition is not a formality. Section 3.7.2 showed BBR (Bottleneck Bandwidth and Round-trip propagation time) having to add specific machinery so that a delay-based sender would not be trampled by loss-based ones. Interoperating on the wire is easy; sharing a bottleneck politely is the hard part.

QUIC

Suppose an application needs more than UDP gives but does not want everything TCP brings, or wants something different again. The designer can always roll their own protocol at the application layer. That is the approach taken in QUIC [Langley 2017, QUIC 2020].

QUIC is a new application-layer protocol, designed from the ground up to improve the performance of transport-layer services for secure HTTP (HyperText Transfer Protocol) . It is already widely deployed, though still being standardised as an RFC (Request For Comments) .

Where it runs, and how much of the Internet it carries

Google has deployed QUIC on many public-facing web servers, in the mobile YouTube app, in the Chrome browser, and in Android’s Google Search app. More than 7 % of Internet traffic was QUIC as measured in [Langley 2017].

The stack is: QUIC over UDP over IP (Internet Protocol) , with a simplified but evolved version of HTTP/2 above it. HTTP/3 natively incorporates QUIC [HTTP/3 2020].

Give the year with the 7 % figure — it is a 2017 measurement, in a 2021 book.

Figure 3.58 — the traditional secure stack, and the QUIC oneApplicationTransportNetworkHTTP/2 TLS (Transport Layer Security) TCPIPa. two handshakes, one after the otherHTTP/3HTTP/2 (slimmed)QUICUDPIPb. one handshake, and it is all application layerall abovethe transportlayer

Connection-oriented, and always encrypted

Like TCP, QUIC is connection-oriented between two endpoints, and needs a handshake to establish connection state. Two pieces of that state are the source and destination connection ID.

All QUIC packets are encrypted. And because encryption was assumed from the start, QUIC combines the handshakes needed to establish connection state with those needed for authentication and encryption. The traditional stack cannot do that: TLS runs on top of TCP, so TCP’s handshake must finish before TLS’s can begin.

Figure 3.58 — what it costs to open a secure connection

Two negotiations, one after the other. TCP must finish before TLS can begin, because TLS runs on top of it.

message 6 of 6
ClientLin’s browserTimeServerwww.example.eduTimeTCP connection establishedonly now can the request goSYNSYN, ACKACKTLS handshake beginsTLS handshake continuesHTTP request, at last

Click any arrow to see what that message says and why it is sent.

Two stacks, the same goal. Switch between them and count the exchanges before any application data moves.

Read this diagram as text
  1. Client sends SYN to Server. The three-way handshake of section 3.5.6 begins. No application data can travel yet.
  2. Server sends SYN, ACK to Client.
  3. Client sends ACK to Server. The TCP connection now exists. One full round trip has been spent, and nothing has been encrypted or authenticated.
  4. Client sends TLS handshake begins to Server. Only now can TLS start negotiating keys and certificates, over the connection TCP just built. Chapter 8 covers what this exchange contains; the point here is that it is a SECOND negotiation, and it could not begin any earlier.
  5. Server sends TLS handshake continues to Client.
  6. Client sends HTTP request, at last to Server. Multiple round trips have gone before a single byte of the request. Section 2.2.2 counted the TCP part of this cost; the TLS part is on top of it.

Lifelines, left to right: Client (host), Server (server).

Streams

QUIC lets several application-level streams be multiplexed through a single connection, and once the connection exists, new streams can be added quickly.

A stream is an abstraction for reliable, in-order, two-way delivery between two QUIC endpoints. In HTTP/3, there is a different stream for each object in a web page. Each connection carries a connection ID and each stream a stream ID, both in the QUIC packet header. Data from several streams may travel in a single QUIC segment inside one UDP segment.

This idea is older than QUIC

The Stream Control Transmission Protocol, SCTP (Stream Control Transmission Protocol) [RFC 4960, RFC 3286], is an earlier reliable, message-oriented protocol that pioneered multiplexing multiple application-level streams through a single connection.

It is still in use: chapter 7 shows SCTP carrying control-plane protocols in 4G and 5G cellular networks.

And this is what removes head-of-line blocking

Figure 3.59 — one lost segment, two outcomes

TCP delivers one in-order byte stream. Nothing past a gap can be handed up, however cleanly it arrived.

message 5 of 5
ServerTimeClientthe application aboveTimeobjects 3 and 4 held — nothing wrong with themobjects 2, 3, 4 delivered at lastobject 1object 2object 3object 4object 2 (retransmitted)

Click any arrow to see what that message says and why it is sent.

Four objects being fetched. In both runs the same segment is lost. Watch what happens to the objects that arrived perfectly.

Read this diagram as text
  1. Server sends object 1 to Client.
  2. Server sends object 2 to Client — lost. Lost in the network.
  3. Server sends object 3 to Client. Arrives intact — and is buffered, not delivered. Section 3.5.4 showed that real TCP implementations do buffer out-of-order segments; what they cannot do is hand them to the application, because that would break the in-order guarantee.
  4. Server sends object 4 to Client. Also intact, also stuck behind the gap.
  5. Server sends object 2 (retransmitted) to Client — retransmission. Only when this arrives can objects 2, 3 and 4 all be delivered together. Objects 3 and 4 waited for a retransmission of something else entirely — head-of-line blocking, exactly as section 2.2.5 described it.

Lifelines, left to right: Server (server), Client (host).

The problem chapter 2 could only half solve

Section 2.2.5 introduced head-of-line blocking, and section 2.2.6 showed HTTP/2 attacking it by cutting messages into interleaved HTTP/2 frames. That helped — but it left the deeper problem alone.

Because TCP provides reliable, in-order byte delivery, everything sent over one connection must be delivered in order. If bytes from one HTTP message are lost, the messages behind them cannot be delivered until the lost bytes have been retransmitted and received. HTTP/2’s interleaving happens above a connection that still blocks.

QUIC provides reliable in-order delivery per stream. A lost UDP segment affects only the streams whose data it carried; messages in other streams keep being delivered. That is the piece HTTP/2 could not reach, and it is why HTTP/3 exists.

Its reliable delivery uses acknowledgement mechanisms similar to TCP’s, as specified in RFC 5681 — the same document behind section 3.5.4.

Congestion control

QUIC’s congestion control is based on TCP NewReno [RFC 6582], a slight modification of the Reno protocol from section 3.7.1.

Its own draft specification says it best: “Readers familiar with TCP’s loss detection and congestion control will find algorithms here that parallel well-known TCP ones.”

In plain words

QUIC did not invent new transport machinery. It took what this chapter spent a hundred pages building — sequence numbers, acknowledgements, timers, retransmission, a probing congestion window — and moved it somewhere it could be changed.

That is the whole argument. TCP is in the operating system, so changing it means changing operating systems, and in practice middleboxes too. QUIC is in the application, so changing it means shipping a new browser.

TCP against QUIC
TCPin the operating systemQUICin the application
Layer
Runs over
Connection-oriented
Encryption
In-order delivery is guaranteed across
Congestion control
How fast it can change

Cells marked ⓘ have a reason behind them — click to read it.

QUIC does almost everything TCP does. What changed is where it lives — and one thing it does differently.

Why the layer matters more than the algorithms

QUIC is an application-layer protocol providing reliable, congestion-controlled data transfer between two endpoints. Its authors stress what that buys: changes can be made at “application-update timescales” — far faster than TCP or UDP can be updated.

Look back at what this chapter has covered and notice how much of it is thirty or forty years old. Slow start and congestion avoidance were standardised in the late 1980s. The segment format has not changed. That stability is a virtue and also a cage, and QUIC is an escape from it rather than a replacement for what is inside.

Check yourself

Check yourself

0 of 6 answered
  1. 1.Which layer does QUIC belong to?

    Look at what it runs on top of.

  2. 2.predictSwitch the handshake ladder to QUIC. Why does it need fewer exchanges than TCP with TLS?

  3. 3.predictIn the head-of-line blocking comparison, a segment carrying part of object 2 is lost. What happens to objects 3 and 4?

  4. 4.What is QUIC's congestion control based on?

  5. 5.The book says it is "probably not even correct anymore to refer to 'the' TCP protocol". What do the many versions still share?

  6. 6.Why does it matter that QUIC lives in the application layer?

What to remember

  • QUIC is an application-layer protocol running over UDP. It does TCP’s job from a place where it can be changed quickly, and that timescale — application updates rather than operating-system updates — is the real gain.
  • Because encryption was assumed from the start, QUIC merges the connection and security handshakes. The traditional stack must do TCP first, then TLS on top.
  • A QUIC stream is reliable, in-order, two-way delivery, and HTTP/3 uses one per object. Per-stream delivery is what finally kills head-of-line blocking: a lost segment delays only its own streams.