What is QUIC?

A transport-layer protocol that runs over UDP. It builds in TLS 1.3 encryption and combines connection setup and key exchange into one round trip. It multiplexes several streams in one connection, and losing a packet on one stream does not stall the others. It is the basis of HTTP/3 and was standardized by the IETF as RFC 9000 in 2021.

Japanese name: QUIC

QUIC appears in 3 practice questions across 2 topics, including Computer Networking Basics, Web Technology Basics.

Field: Computer Networking Basics

Why build on UDP

A new transport protocol placed directly on IP would be blocked by many NATs and firewalls along the way, which do not pass protocols they do not recognize. TCP is also implemented inside operating-system kernels, so improvements take a long time to reach devices everywhere. QUIC runs on UDP, which passes almost everywhere, and runs inside applications and libraries, so it can be improved as quickly as browsers are updated. It also encrypts most of its header, which stops devices along the path from depending on its details and blocking future changes.

Fast setup and stream multiplexing

With TCP and TLS, the TLS handshake follows TCP's three-way handshake; QUIC merges the two so that data can flow after one round trip. To a server it has connected to before, it can send data in the very first packet (0-RTT), though only for requests that are harmless if repeated. HTTP/2 carries several streams over one TCP connection, so a single lost packet holds up every stream; QUIC orders data per stream, so a loss affects only the stream it belongs to.

Connection IDs and loss recovery

A TCP connection is identified by IP addresses and port numbers, so it breaks when a smartphone switches from Wi-Fi to a mobile network. QUIC identifies connections by connection IDs, so a connection can survive an address change (connection migration). Loss detection, retransmission and congestion control all happen inside QUIC, and because packet numbers are never reused, a retransmission can be told apart from the original and the RTT can be measured accurately. On the other hand, it tends to use more CPU than TCP, which benefits from extensive kernel and network-card support.

Try it: questions about QUIC

Which correctly describes UDP?

  1. AIt does not establish a connection or control retransmission and ordering, so its header is small and there is no wait before sending
  2. BIt establishes a connection, retransmits data that did not arrive and puts data back in order at the receiver
  3. CIt delivers data to the destination host using only MAC addresses, without IP addresses
Show answer and explanation

Answer: A. It does not establish a connection or control retransmission and ordering, so its header is small and there is no wait before sending

UDP is a lightweight protocol that adds only port numbers and a simple error check (checksum) on top of IP; its header is 8 bytes (TCP's is 20 bytes without options). With no connection setup, no delivery confirmation and no retransmission, it is used for voice calls and live video, where a little loss is better than delay, and for DNS, which needs just one query and one response. If reliability is needed, the application provides it; QUIC, used by HTTP/3, implements retransmission and encryption on top of UDP. Connection setup, retransmission and ordering are what TCP does.

A client makes a new HTTPS connection (TLS 1.3 over TCP) to a web server with a round-trip time (RTT) of 100 ms. Roughly how long does it take until the response to the first request starts to arrive? Assume DNS resolution is already done, and ignore server processing time and data transfer time.

  1. AAbout 100 ms
  2. BAbout 300 ms
  3. CAbout 200 ms
Show answer and explanation

Answer: B. About 300 ms

First, the TCP three-way handshake takes one round trip (the client can send its first TLS message together with the final ACK). Next, the TLS 1.3 handshake takes one round trip, and then the HTTP request and response take one more, for three round trips in total: 3 × 100 = 300 ms. With TLS 1.2 the key exchange takes two round trips, giving four round trips, or 400 ms. This waiting time depends on the number of RTTs, which is set by distance, so adding link bandwidth does not shorten it. QUIC, used by HTTP/3, combines the transport and cryptographic handshakes into one round trip and also offers a way to send data in the first flight when reconnecting (0-RTT).

FAQ

What is the difference between QUIC and TCP?

Both provide reliable, ordered delivery, but QUIC runs over UDP and builds in TLS 1.3 encryption. It sets up connections faster (one round trip, or zero when resuming), carries several independent streams in one connection, and keeps a connection alive when the IP address changes.

How are HTTP/3 and QUIC related?

HTTP/3 is the version of HTTP that runs over QUIC. The stream multiplexing and encryption that HTTP/2 got from TCP and TLS are provided by QUIC instead, which is why HTTP/3 traffic normally uses UDP port 443.

QUIC in the explanations

Questions that mention QUIC (3)

  1. Which correctly describes UDP?
  2. A client makes a new HTTPS connection (TLS 1.3 over TCP) to a web server with a round-trip time (RTT) of 100 ms. Roughly how long does it take until the response to the first request starts to arrive? Assume DNS resolution is already done, and ignore server processing time and data transfer time.
  3. Which of the following correctly describes HTTP/2 and HTTP/3?

Books on Computer Networking Basics Ad

As an Amazon Associate I earn from qualifying purchases.

Related terms

TCP (Transmission Control Protocol) HTTP (Hypertext Transfer Protocol) UDP (User Datagram Protocol) DNS (Domain Name System) IP (Internet Protocol) ARQ (automatic repeat request) HTTPS TLS Round-trip time (RTT) Three-way handshake

Back to the glossary