HTTP/1.1 vs HTTP/2 vs HTTP/3 benchmarks: round trips, lost packets and CPU

Networking

HTTP/3 is HTTP over QUIC, a transport that runs on UDP and carries its own TLS 1.3, instead of TCP with TLS on top. The case for it rests on two claims: a new connection needs fewer round trips, and a lost packet holds up only the request it belongs to, not every request on the connection. Against it: QUIC runs in the application, not the kernel, and is said to cost more CPU. This benchmark measures all three claims, plus page loads and raw throughput, with the three HTTP versions served by the same program.

Everything below was measured on one machine, in Docker, with one Go server process answering HTTP/1.1, HTTP/2 and HTTP/3 from the same handler with the same certificate, and Go clients. Every response body is generated from its object number and offset, and the client compares every byte: 693,280 responses and updates, 121 GB of bodies, 0 corrupted, 0 missing.

SetupDetails
ServerOne Go 1.27.2 process: net/http for HTTP/1.1 and HTTP/2 (TLS over TCP; ALPN, the TLS extension in which the client names the protocols it speaks, picks one), quic-go v0.63.0 http3 for HTTP/3 (UDP), same port number, same handler, same certificate · quic-go at its defaults (0-RTT allowed, CUBIC congestion control, pacing; congestion control is the rule by which a sender grows how much it may have in flight while packets get through and cuts it when one is lost) · 2 cores, GOMAXPROCS=2
ClientsGo 1.27.2 net/http (HTTP/1.1 or HTTP/2 only, forced per run) and quic-go http3.Transport; no Alt-Svc discovery: the client is told which version to speak · 4 cores
TLS1.3 everywhere, ECDSA P-256 certificate, key exchange X25519MLKEM768 (Go’s default) · session tickets only where a row says resumed or 0-RTT · Go’s TCP client has no TLS early data, so 0-RTT exists only for HTTP/3
TCPLinux 7.0, CUBIC, TCP_NODELAY (Go’s default), receive buffer up to 32 MB · no TCP Fast Open
NetworkOne network namespace, IPv4 loopback, the machine talking to itself, with packets of at most 1,500 bytes (an Ethernet MTU) and every offload off (TCP segmentation, generic segmentation and receive, UDP segmentation), so counters see real-sized packets; quic-go still batches with UDP GSO, segmented by the kernel in software · links emulated with tc netem: LAN (nothing added), 50 ms round trip, 200 ms round trip with 1 % random loss in each direction, no bandwidth limit
CPUAMD Ryzen AI Max+ 395 · cores 0–7 and their SMT siblings reserved for the benchmark, everything else moved to the chip’s other core complex (CCD) · server on cores 2–3, client on 4–7
MethodEvery cell is a fresh client process, run 5 times · reported value: median of the 5 runs (the middle one) · bytes from the interface counters, all headers included · server CPU from the server process’s own getrusage, read before and after · a wait for a quiet link before every cell

The scoreboard

Scoreboard, median per protocol. New connection, 50 ms link: HTTP/1.1 152 ms, HTTP/2 152 ms, HTTP/3 103 ms. 51 small files, 50 ms link: HTTP/1.1 706 ms, HTTP/2 354 ms, HTTP/3 283 ms. 4 large files, 50 ms link: HTTP/1.1 653 ms, HTTP/2 553 ms, HTTP/3 454 ms. Updates > 50 ms late, 1 % loss: HTTP/1.1 6.0 %, HTTP/2 19.2 %, HTTP/3 8.5 %. Download, LAN: HTTP/1.1 2,054 MB/s, HTTP/2 1,145 MB/s, HTTP/3 1,120 MB/s. Download, 50 ms link: HTTP/1.1 38 MB/s, HTTP/2 42 MB/s, HTTP/3 60 MB/s. Server CPU per 1 KiB request: HTTP/1.1 9.8 µs, HTTP/2 17.9 µs, HTTP/3 16.3 µs. Server CPU per MB downloaded: HTTP/1.1 489 µs, HTTP/2 909 µs, HTTP/3 1,109 µs. Best in every run, out of 8 measures: HTTP/3 on 4 · HTTP/1.1 on 3; 1 has no fixed order Eight measures from the sections below · each protocol as a multiple of the best HTTP/1.1 HTTP/2 HTTP/3 1× = the best median; grey line: lowest to highest run 1× (best) 2× 3× 5× New connection, 50 ms link 152 ms 152 ms 103 ms 51 small files, 50 ms link 706 ms 354 ms 283 ms 4 large files, 50 ms link 653 ms 553 ms 454 ms Updates > 50 ms late, 1 % loss 6.0 % 19.2 % 8.5 % Download, LAN 2,054 MB/s 1,145 MB/s 1,120 MB/s Download, 50 ms link 38 MB/s 42 MB/s 60 MB/s Server CPU per 1 KiB request 9.8 µs 17.9 µs 16.3 µs Server CPU per MB downloaded 489 µs 909 µs 1,109 µs Each bar is that protocol's median as a multiple of the best median for the measure, log scale: 1× is the best, a bar twice as long is twice as costly. Grey line: lowest to highest of the 5 process runs; the median is printed after each bar.
Eight headline measures from the sections below, each protocol's median as a multiple of the best median for that measure (1×; log scale, a longer bar is worse), labelled with the measured value. Median of 5 process runs; grey line: lowest to highest run. The 50 ms link has no loss; the 1 % loss row is the 200 ms link; CPU rows are the LAN.
Scoreboard, median per protocol. New connection, 50 ms link: HTTP/1.1 152 ms, HTTP/2 152 ms, HTTP/3 103 ms. 51 small files, 50 ms link: HTTP/1.1 706 ms, HTTP/2 354 ms, HTTP/3 283 ms. 4 large files, 50 ms link: HTTP/1.1 653 ms, HTTP/2 553 ms, HTTP/3 454 ms. Updates > 50 ms late, 1 % loss: HTTP/1.1 6.0 %, HTTP/2 19.2 %, HTTP/3 8.5 %. Download, LAN: HTTP/1.1 2,054 MB/s, HTTP/2 1,145 MB/s, HTTP/3 1,120 MB/s. Download, 50 ms link: HTTP/1.1 38 MB/s, HTTP/2 42 MB/s, HTTP/3 60 MB/s. Server CPU per 1 KiB request: HTTP/1.1 9.8 µs, HTTP/2 17.9 µs, HTTP/3 16.3 µs. Server CPU per MB downloaded: HTTP/1.1 489 µs, HTTP/2 909 µs, HTTP/3 1,109 µs. Best in every run, out of 8 measures: HTTP/3 on 4 · HTTP/1.1 on 3; 1 has no fixed order Eight measures from the sections below · each protocol as a multiple of the best HTTP/1.1 HTTP/2 HTTP/3 1× = the best median; grey line: lowest to highest run 1× (best) 2× 3× 5× New connection, 50 ms HTTP/1.1 152 ms HTTP/2 152 ms HTTP/3 103 ms 51 small files, 50 ms HTTP/1.1 706 ms HTTP/2 354 ms HTTP/3 283 ms 4 large files, 50 ms HTTP/1.1 653 ms HTTP/2 553 ms HTTP/3 454 ms Updates > 50 ms late, 1 % loss HTTP/1.1 6.0 % HTTP/2 19.2 % HTTP/3 8.5 % Download, LAN HTTP/1.1 2,054 MB/s HTTP/2 1,145 MB/s HTTP/3 1,120 MB/s Download, 50 ms HTTP/1.1 38 MB/s HTTP/2 42 MB/s HTTP/3 60 MB/s CPU per 1 KiB request HTTP/1.1 9.8 µs HTTP/2 17.9 µs HTTP/3 16.3 µs CPU per MB downloaded HTTP/1.1 489 µs HTTP/2 909 µs HTTP/3 1,109 µs Each bar is that protocol's median as a multiple of the best median for the measure, log scale: 1× is the best, a bar twice as long is twice as costly. Grey line: lowest to highest of the 5 process runs; the median is printed after each bar.
Eight headline measures from the sections below, each protocol's median as a multiple of the best median for that measure (1×; log scale, a longer bar is worse), labelled with the measured value. Median of 5 process runs; grey line: lowest to highest run. The 50 ms link has no loss; the 1 % loss row is the 200 ms link; CPU rows are the LAN.
MeasureHTTP/1.1HTTP/2HTTP/3HTTP/2 vs HTTP/1.1HTTP/3 vs HTTP/1.1
New connection, 50 ms link152 ms
152–153 ms
152 ms
152–153 ms
103 ms
102–104 ms
same1.5×
51 small files, 50 ms link706 ms
705–710 ms
354 ms
353–403 ms
283 ms
282–283 ms
2.0×2.5×
4 large files, 50 ms link653 ms
606–656 ms
553 ms
504–605 ms
454 ms
454–456 ms
1.2×1.4×
Updates > 50 ms late, 1 % loss6.0 %
4.8–7.2 %
19.2 %
12.2–41.1 %
8.5 %
4.7–19.0 %
0.31×0.70×
Download, LAN2,054 MB/s
2,045–2,089 MB/s
1,145 MB/s
1,140–1,158 MB/s
1,120 MB/s
1,095–1,133 MB/s
0.56×0.55×
Download, 50 ms link38 MB/s
30–38 MB/s
42 MB/s
36–56 MB/s
60 MB/s
50–65 MB/s
1.1×1.6×
Server CPU per 1 KiB request9.8 µs
9.8–9.9 µs
17.9 µs
17.4–18.4 µs
16.3 µs
16.2–17.4 µs
0.55×0.60×
Server CPU per MB downloaded489 µs
481–491 µs
909 µs
899–916 µs
1,109 µs
1,099–1,115 µs
0.54×0.44×

Median of 5 process runs, lowest to highest run beneath; bold: best in every run; the vs columns: above 1× better than HTTP/1.1, below 1× worse, same: rounds to 1×.

Counting a measure only where every run agrees, against HTTP/1.1: HTTP/2 is better on 2 (up to 2.0× on 51 small files, 50 ms link), worse on 4 (down to 0.31× on updates > 50 ms late, 1 % loss) and ties on 2; HTTP/3 is better on 4 (up to 2.5× on 51 small files, 50 ms link), worse on 3 (down to 0.44× on server CPU per MB downloaded) and ties on 1. The sections below take each measure in turn, with the 200 ms link and the runs behind every median.

Factor against HTTP/1.1 per measure, above 1 is better than HTTP/1.1. New connection, 50 ms link: HTTP/2 1.00×, HTTP/3 1.5×. 51 small files, 50 ms link: HTTP/2 2.0×, HTTP/3 2.5×. 4 large files, 50 ms link: HTTP/2 1.2×, HTTP/3 1.4×. Updates > 50 ms late, 1 % loss: HTTP/2 0.31×, HTTP/3 0.70×. Download, LAN: HTTP/2 0.56×, HTTP/3 0.55×. Download, 50 ms link: HTTP/2 1.1×, HTTP/3 1.6×. Server CPU per 1 KiB request: HTTP/2 0.55×, HTTP/3 0.60×. Server CPU per MB downloaded: HTTP/2 0.54×, HTTP/3 0.44×. Against HTTP/1.1, 8 measures: HTTP/3 better on 4 · HTTP/2 on 2 Medians of 5 process runs · log scale · above 1× is better than HTTP/1.1 HTTP/3 HTTP/2 0.5× 1× (parity) 2× 3× New connection, 50 ms link HTTP/3 1.5× · HTTP/2 same 51 small files, 50 ms link HTTP/3 2.5× · HTTP/2 2.0× 4 large files, 50 ms link HTTP/3 1.4× · HTTP/2 1.2× Updates > 50 ms late, 1 % loss HTTP/3 0.70× · HTTP/2 0.31× Download, LAN HTTP/3 0.55× · HTTP/2 0.56× Download, 50 ms link HTTP/3 1.6× · HTTP/2 1.1× Server CPU per 1 KiB request HTTP/3 0.60× · HTTP/2 0.55× Server CPU per MB downloaded HTTP/3 0.44× · HTTP/2 0.54× ← HTTP/1.1 better HTTP/3 or HTTP/2 better →
Each protocol's median against HTTP/1.1's on the same measure, log scale; above 1× it is better than HTTP/1.1 (faster, more throughput, fewer late updates or less CPU). Filled dot: HTTP/3; hollow: HTTP/2. Median of 5 process runs.
Factor against HTTP/1.1 per measure, above 1 is better than HTTP/1.1. New connection, 50 ms link: HTTP/2 1.00×, HTTP/3 1.5×. 51 small files, 50 ms link: HTTP/2 2.0×, HTTP/3 2.5×. 4 large files, 50 ms link: HTTP/2 1.2×, HTTP/3 1.4×. Updates > 50 ms late, 1 % loss: HTTP/2 0.31×, HTTP/3 0.70×. Download, LAN: HTTP/2 0.56×, HTTP/3 0.55×. Download, 50 ms link: HTTP/2 1.1×, HTTP/3 1.6×. Server CPU per 1 KiB request: HTTP/2 0.55×, HTTP/3 0.60×. Server CPU per MB downloaded: HTTP/2 0.54×, HTTP/3 0.44×. Against HTTP/1.1, 8 measures: HTTP/3 better on 4 · HTTP/2 on 2 Medians of 5 process runs · log scale · above 1× is better than HTTP/1.1 HTTP/3 HTTP/2 0.5× 1× (parity) 2× 3× New connection, 50 ms HTTP/3 1.5× · HTTP/2 same 51 small files, 50 ms HTTP/3 2.5× · HTTP/2 2.0× 4 large files, 50 ms HTTP/3 1.4× · HTTP/2 1.2× Updates > 50 ms late, 1 % loss HTTP/3 0.70× · HTTP/2 0.31× Download, LAN HTTP/3 0.55× · HTTP/2 0.56× Download, 50 ms HTTP/3 1.6× · HTTP/2 1.1× CPU per 1 KiB request HTTP/3 0.60× · HTTP/2 0.55× CPU per MB downloaded HTTP/3 0.44× · HTTP/2 0.54× ← HTTP/1.1 better HTTP/3 or HTTP/2 better →
Each protocol's median against HTTP/1.1's on the same measure, log scale; above 1× it is better than HTTP/1.1 (faster, more throughput, fewer late updates or less CPU). Filled dot: HTTP/3; hollow: HTTP/2. Median of 5 process runs.

Opening a connection

The first request on a new connection pays for the handshakes before it. Over TCP that is TCP’s own handshake, then TLS 1.3’s, then the request: three round trips. QUIC merges the transport handshake into TLS, so the request can follow after one round trip and the response arrives after two. With a session ticket from an earlier visit, QUIC can also send the request in its very first packet, 0-RTT.

Time from nothing to one 1 KiB response, new connection, per link. LAN, no added delay: HTTP/1.1 1.41 ms, HTTP/2 1.58 ms, HTTP/2, resumed TLS 1.58 ms, HTTP/3 2.01 ms, HTTP/3, resumed 1.69 ms, HTTP/3, 0-RTT 1.59 ms. 50 ms round trip: HTTP/1.1 152 ms, HTTP/2 152 ms, HTTP/2, resumed TLS 152 ms, HTTP/3 103 ms, HTTP/3, resumed 102 ms, HTTP/3, 0-RTT 51.8 ms. 200 ms round trip, 1 % loss: HTTP/1.1 603 ms, HTTP/2 603 ms, HTTP/2, resumed TLS 603 ms, HTTP/3 403 ms, HTTP/3, resumed 403 ms, HTTP/3, 0-RTT 202 ms. First response on a 50 ms link: 152 ms over TCP, 103 ms over QUIC, 51.8 ms with 0-RTT New connection, TLS 1.3 included, until the last byte of a 1 KiB response · on the LAN all six take 1–2 ms HTTP/1.1 HTTP/2 HTTP/3 each link has its own scale · grey line: lowest to highest run LAN, no added delay HTTP/1.1 1.41 ms HTTP/2 1.58 ms HTTP/2, resumed TLS 1.58 ms HTTP/3 2.01 ms HTTP/3, resumed 1.69 ms HTTP/3, 0-RTT 1.59 ms 50 ms round trip HTTP/1.1 152 ms · 3.0 RTT HTTP/2 152 ms · 3.0 RTT HTTP/2, resumed TLS 152 ms · 3.0 RTT HTTP/3 103 ms · 2.1 RTT HTTP/3, resumed 102 ms · 2.0 RTT HTTP/3, 0-RTT 51.8 ms · 1.0 RTT 200 ms round trip, 1 % loss HTTP/1.1 603 ms · 3.0 RTT HTTP/2 603 ms · 3.0 RTT HTTP/2, resumed TLS 603 ms · 3.0 RTT HTTP/3 403 ms · 2.0 RTT HTTP/3, resumed 403 ms · 2.0 RTT HTTP/3, 0-RTT 202 ms · 1.0 RTT TCP needs its own handshake before TLS can start: three round trips to the first response. QUIC does transport and TLS in one: two. Resuming TLS saves bytes, not round trips; only 0-RTT saves one more.
A new connection, from the first packet to the last byte of a 1 KiB response (no DNS). Resumed: the client holds a TLS session ticket from an earlier connection; 0-RTT: it also sends the request in its first flight. Median of 5 process runs × 5 connections (10 on the LAN). RTT = round trips at that link's delay. Each link has its own scale.
Time from nothing to one 1 KiB response, new connection, per link. LAN, no added delay: HTTP/1.1 1.41 ms, HTTP/2 1.58 ms, HTTP/2, resumed TLS 1.58 ms, HTTP/3 2.01 ms, HTTP/3, resumed 1.69 ms, HTTP/3, 0-RTT 1.59 ms. 50 ms round trip: HTTP/1.1 152 ms, HTTP/2 152 ms, HTTP/2, resumed TLS 152 ms, HTTP/3 103 ms, HTTP/3, resumed 102 ms, HTTP/3, 0-RTT 51.8 ms. 200 ms round trip, 1 % loss: HTTP/1.1 603 ms, HTTP/2 603 ms, HTTP/2, resumed TLS 603 ms, HTTP/3 403 ms, HTTP/3, resumed 403 ms, HTTP/3, 0-RTT 202 ms. First response on a 50 ms link: 152 ms over TCP, 103 ms over QUIC, 51.8 ms with 0-RTT New connection, TLS 1.3 included, until the last byte of a 1 KiB response · on the LAN all six take 1–2 ms HTTP/1.1 HTTP/2 HTTP/3 each link has its own scale · grey line: lowest to highest run LAN, no added delay HTTP/1.1 1.41 ms HTTP/2 1.58 ms HTTP/2, resumed TLS 1.58 ms HTTP/3 2.01 ms HTTP/3, resumed 1.69 ms HTTP/3, 0-RTT 1.59 ms 50 ms round trip HTTP/1.1 152 ms · 3.0 RTT HTTP/2 152 ms · 3.0 RTT HTTP/2, resumed TLS 152 ms · 3.0 RTT HTTP/3 103 ms · 2.1 RTT HTTP/3, resumed 102 ms · 2.0 RTT HTTP/3, 0-RTT 51.8 ms · 1.0 RTT 200 ms round trip, 1 % loss HTTP/1.1 603 ms · 3.0 RTT HTTP/2 603 ms · 3.0 RTT HTTP/2, resumed TLS 603 ms · 3.0 RTT HTTP/3 403 ms · 2.0 RTT HTTP/3, resumed 403 ms · 2.0 RTT HTTP/3, 0-RTT 202 ms · 1.0 RTT TCP needs its own handshake before TLS can start: three round trips to the first response. QUIC does transport and TLS in one: two. Resuming TLS saves bytes, not round trips; only 0-RTT saves one more.
A new connection, from the first packet to the last byte of a 1 KiB response (no DNS). Resumed: the client holds a TLS session ticket from an earlier connection; 0-RTT: it also sends the request in its first flight. Median of 5 process runs × 5 connections (10 on the LAN). RTT = round trips at that link's delay. Each link has its own scale.

The round trips come out exactly as designed. On the 50 ms link:

On the lossy 200 ms link the medians are 603 ms (HTTP/2), 403 ms (HTTP/3) and 202 ms (0-RTT), the same round trips. The bytes and packets each connection costs, close included, on the LAN:

New connectionLAN50 ms200 ms
1 % loss
BytesPacketsServer CPU
HTTP/1.11.41 ms152 ms603 ms5,772 B20976 µs
HTTP/21.58 ms152 ms603 ms6,328 B271,080 µs
HTTP/32.01 ms103 ms403 ms8,013 B141,492 µs
HTTP/1.1, resumed1.30 ms152 ms602 ms5,539 B20940 µs
HTTP/2, resumed1.58 ms152 ms603 ms6,118 B281,136 µs
HTTP/3, resumed1.69 ms102 ms403 ms7,519 B141,282 µs
HTTP/3, 0-RTT1.59 ms51.8 ms202 ms7,373 B111,323 µs

QUIC sends more bytes and fewer packets. Its first packet from the client must be padded to at least 1,200 bytes so that a spoofed address cannot be used to amplify an attack; here the ClientHello, with its 1,216-byte post-quantum key share, needs two such packets. QUIC also packs what TCP sends as separate acknowledgements into the packets it is sending anyway. 0-RTT is the cheapest in packets, 11, against 27 for a full HTTP/2 connection. The catch with 0-RTT is that early data can be replayed by an attacker who captured it, which is why the client may only send safe requests such as a GET that way.

One cost shows only on the 200 ms link, and not because of its loss: a full QUIC connection took 12,871 B in 19 packets there, against 8,013 B in 14 on the LAN and the 50 ms link. quic-go assumes a 100 ms round trip until it has measured one and arms its first retransmission timer at twice that, 200 ms, which on this link is the moment the server’s first reply arrives; the timer usually wins, and the client repeats its handshake packets as probes just before the reply lands. A side check outside the measured runs, with the same delay and no loss, confirmed it: at a 120 ms round trip a connection cost 7,972 B in 13 packets, as on the LAN; at 200 ms, 11,707 B in 17. TCP’s connection costs about the same bytes on every link.

Loading a page

A page is rarely one request. The first test is a page made of one 16 KiB HTML document and 50 small files of 4 KiB (images, scripts, styles): the client fetches the HTML, then everything else at once. HTTP/1.1 can carry one request at a time per connection, so the client opens up to six, as browsers do; HTTP/2 and HTTP/3 send all 50 on one connection.

Time to the last byte of a page, 1 HTML document of 16 KiB + 50 objects of 4 KiB, new connections, per link. LAN, no added delay: HTTP/1.1 3.27 ms, HTTP/2 3.11 ms, HTTP/3 3.61 ms. 50 ms round trip: HTTP/1.1 706 ms, HTTP/2 354 ms, HTTP/3 283 ms. 200 ms round trip, 1 % loss: HTTP/1.1 3.21 s, HTTP/2 1.81 s, HTTP/3 1.50 s. 51 small files on a 50 ms link: HTTP/1.1 706 ms, HTTP/2 354 ms, HTTP/3 283 ms; with 1 % loss HTTP/2 and HTTP/3 trade places from run to run 1 HTML document of 16 KiB + 50 objects of 4 KiB · time to the last byte, connection setup included HTTP/1.1 HTTP/2 HTTP/3 each link has its own scale · grey line: lowest to highest run LAN, no added delay HTTP/1.1 3.27 ms HTTP/2 3.11 ms HTTP/3 3.61 ms 50 ms round trip HTTP/1.1 706 ms · 14.1 RTT HTTP/2 354 ms · 7.1 RTT HTTP/3 283 ms · 5.7 RTT 200 ms round trip, 1 % loss HTTP/1.1 3.21 s · 16.1 RTT HTTP/2 1.81 s · 9.0 RTT HTTP/3 1.50 s · 7.5 RTT On a slow link the round trips decide: HTTP/1.1 pays a handshake per connection and one request per round trip on each, HTTP/2 and HTTP/3 send all 50 requests at once on one connection, and QUIC's handshake is one round trip shorter.
1 HTML document of 16 KiB + 50 objects of 4 KiB: the HTML first, then every object at once. HTTP/1.1 opens up to 6 connections, as browsers do; HTTP/2 and HTTP/3 one. Every connection starts cold, without a session ticket. Median of 5 process runs; each link has its own scale.
Time to the last byte of a page, 1 HTML document of 16 KiB + 50 objects of 4 KiB, new connections, per link. LAN, no added delay: HTTP/1.1 3.27 ms, HTTP/2 3.11 ms, HTTP/3 3.61 ms. 50 ms round trip: HTTP/1.1 706 ms, HTTP/2 354 ms, HTTP/3 283 ms. 200 ms round trip, 1 % loss: HTTP/1.1 3.21 s, HTTP/2 1.81 s, HTTP/3 1.50 s. 51 small files on a 50 ms link: HTTP/1.1 706 ms, HTTP/2 354 ms, HTTP/3 283 ms; with 1 % loss HTTP/2 and HTTP/3 trade places from run to run 1 HTML document of 16 KiB + 50 objects of 4 KiB · time to the last byte, connection setup included HTTP/1.1 HTTP/2 HTTP/3 each link has its own scale · grey line: lowest to highest run LAN, no added delay HTTP/1.1 3.27 ms HTTP/2 3.11 ms HTTP/3 3.61 ms 50 ms round trip HTTP/1.1 706 ms · 14.1 RTT HTTP/2 354 ms · 7.1 RTT HTTP/3 283 ms · 5.7 RTT 200 ms round trip, 1 % loss HTTP/1.1 3.21 s · 16.1 RTT HTTP/2 1.81 s · 9.0 RTT HTTP/3 1.50 s · 7.5 RTT On a slow link the round trips decide: HTTP/1.1 pays a handshake per connection and one request per round trip on each, HTTP/2 and HTTP/3 send all 50 requests at once on one connection, and QUIC's handshake is one round trip shorter.
1 HTML document of 16 KiB + 50 objects of 4 KiB: the HTML first, then every object at once. HTTP/1.1 opens up to 6 connections, as browsers do; HTTP/2 and HTTP/3 one. Every connection starts cold, without a session ticket. Median of 5 process runs; each link has its own scale.

On the LAN all three finish in a few milliseconds. On the slow links the count of round trips decides:

With 1 % loss on the 200 ms link the medians are 3.21 s, 1.81 s and 1.50 s, but only HTTP/1.1’s place is stable: HTTP/3 was the fastest in 3 of the 5 runs and HTTP/2 in the others, each between 1.17 s and 3.66 s depending on which packets the link dropped. At 50 ms the order above held in every run.

The second page is one HTML document and four files of 512 KiB, 2 MiB in all: a page of large images.

Time to the last byte of a page, 1 HTML document of 16 KiB + 4 objects of 512 KiB, new connections, per link. LAN, no added delay: HTTP/1.1 2.90 ms, HTTP/2 3.41 ms, HTTP/3 4.07 ms. 50 ms round trip: HTTP/1.1 653 ms, HTTP/2 553 ms, HTTP/3 454 ms. 200 ms round trip, 1 % loss: HTTP/1.1 3.61 s, HTTP/2 4.90 s, HTTP/3 6.39 s. Four large files on a 50 ms link: HTTP/3 454 ms, HTTP/2 553 ms, HTTP/1.1 653 ms; with 1 % loss 2.81 s to 22.96 s, in no fixed order 1 HTML document of 16 KiB + 4 objects of 512 KiB · time to the last byte, connection setup included HTTP/1.1 HTTP/2 HTTP/3 each link has its own scale · grey line: lowest to highest run LAN, no added delay HTTP/1.1 2.90 ms HTTP/2 3.41 ms HTTP/3 4.07 ms 50 ms round trip HTTP/1.1 653 ms HTTP/2 553 ms HTTP/3 454 ms 200 ms round trip, 1 % loss HTTP/1.1 3.61 s HTTP/2 4.90 s HTTP/3 6.39 s With large files the transfer dominates, and on a lossy link how the sender slows down after a loss: HTTP/1.1's four connections each slow only themselves; HTTP/2 and HTTP/3 carry the whole page on one connection, which slows at every loss. Where the few losses fall decides, so the lossy runs spread widely and no version wins every run.
1 HTML document of 16 KiB + 4 objects of 512 KiB: the HTML first, then every object at once. HTTP/1.1 opens up to 6 connections, as browsers do; HTTP/2 and HTTP/3 one. Every connection starts cold, without a session ticket. Median of 5 process runs; each link has its own scale.
Time to the last byte of a page, 1 HTML document of 16 KiB + 4 objects of 512 KiB, new connections, per link. LAN, no added delay: HTTP/1.1 2.90 ms, HTTP/2 3.41 ms, HTTP/3 4.07 ms. 50 ms round trip: HTTP/1.1 653 ms, HTTP/2 553 ms, HTTP/3 454 ms. 200 ms round trip, 1 % loss: HTTP/1.1 3.61 s, HTTP/2 4.90 s, HTTP/3 6.39 s. Four large files on a 50 ms link: HTTP/3 454 ms, HTTP/2 553 ms, HTTP/1.1 653 ms; with 1 % loss 2.81 s to 22.96 s, in no fixed order 1 HTML document of 16 KiB + 4 objects of 512 KiB · time to the last byte, connection setup included HTTP/1.1 HTTP/2 HTTP/3 each link has its own scale · grey line: lowest to highest run LAN, no added delay HTTP/1.1 2.90 ms HTTP/2 3.41 ms HTTP/3 4.07 ms 50 ms round trip HTTP/1.1 653 ms HTTP/2 553 ms HTTP/3 454 ms 200 ms round trip, 1 % loss HTTP/1.1 3.61 s HTTP/2 4.90 s HTTP/3 6.39 s With large files the transfer dominates, and on a lossy link how the sender slows down after a loss: HTTP/1.1's four connections each slow only themselves; HTTP/2 and HTTP/3 carry the whole page on one connection, which slows at every loss. Where the few losses fall decides, so the lossy runs spread widely and no version wins every run.
1 HTML document of 16 KiB + 4 objects of 512 KiB: the HTML first, then every object at once. HTTP/1.1 opens up to 6 connections, as browsers do; HTTP/2 and HTTP/3 one. Every connection starts cold, without a session ticket. Median of 5 process runs; each link has its own scale.

Without loss the 50 ms link keeps the order of the small page, in every run: 653 ms, 553 ms and 454 ms. With loss the order dissolves. HTTP/1.1, the oldest protocol, has the lowest median at 3.61 s: each of its connections grows its own sending window and, when a packet is lost, slows down only itself. HTTP/2’s median is 4.90 s and HTTP/3’s 6.39 s: one connection carries the whole page, and every loss slows all of it. With 2 MiB and 1 % loss each run loses 7 to 20 packets, and when exactly they fall makes the spread large: HTTP/1.1 ranged from 2.81 s to 4.81 s across runs, HTTP/2 from 3.01 s to 22.96 s, HTTP/3 from 3.65 s to 13.34 s. HTTP/1.1 was the fastest of the three in 3 of the 5 runs: a tendency, not a law.

Head-of-line blocking

TCP delivers one stream of bytes, in order. HTTP/2 interleaves many requests on that stream, so when one packet is lost, every byte after it waits for the retransmission, whichever request it belongs to. QUIC numbers its bytes per stream: a lost packet holds up only the stream it was carrying. This is the main design reason for HTTP/3.

The test isolates it: ten streams on one connection, each receiving a small 200-byte update every 50 ms, staggered so that every packet carries one stream’s update. The rate is low, so bandwidth and congestion control play no part; each update’s lateness, beyond the link’s one-way delay, shows only who waited for whom. HTTP/1.1 gets ten connections, one per stream, as it would need in practice.

Share of small updates arriving more than 50 ms late, 10 streams, 200 ms link with 1 % loss: HTTP/1.1 6.0 % (99th percentile 250 ms late), HTTP/2 19.2 % (99th percentile 252 ms late), HTTP/3 8.5 % (99th percentile 214 ms late). With 1 % loss the typical HTTP/2 update arrives 15.4 ms late, since one lost packet stops every stream; the typical HTTP/3 update is on time (58 µs) 10 streams on one connection · 200 ms link, 1 % loss · share of updates more than 50 ms late HTTP/1.1 HTTP/2 HTTP/3 grey line: lowest to highest run Updates more than 50 ms late HTTP/1.1 · 10 connections 6.0 % HTTP/2 19.2 % HTTP/3 8.5 % How late: typical update (lowest to highest run) · slowest 1 %, beyond the one-way delay HTTP/1.1 31 µs (29–33 µs) · 250 ms HTTP/2 15.4 ms (5.70–30.8 ms) · 252 ms HTTP/3 58 µs (55–91 µs) · 214 ms TCP delivers bytes in order, so one lost packet stops every stream on the connection until it is resent. QUIC orders bytes per stream: the other nine keep arriving on time.
10 streams, each receiving a 200-byte update every 50 ms (staggered, so each packet carries one stream's update), for 20 s; how late each update arrives beyond the link's one-way delay. HTTP/2 and HTTP/3: one connection; HTTP/1.1: one connection per stream. Median of 5 process runs, 20,000 updates per protocol; the link dropped a median of 33 packets per HTTP/2 run and 53 per HTTP/3 run (QUIC sent more, smaller packets). On the LAN and the 50 ms link without loss no update was more than 0.4 ms late at the 99th percentile.
Share of small updates arriving more than 50 ms late, 10 streams, 200 ms link with 1 % loss: HTTP/1.1 6.0 % (99th percentile 250 ms late), HTTP/2 19.2 % (99th percentile 252 ms late), HTTP/3 8.5 % (99th percentile 214 ms late). With 1 % loss the typical HTTP/2 update arrives 15.4 ms late, since one lost packet stops every stream; the typical HTTP/3 update is on time (58 µs) 10 streams on one connection · 200 ms link, 1 % loss · share of updates more than 50 ms late HTTP/1.1 HTTP/2 HTTP/3 grey line: lowest to highest run Updates more than 50 ms late HTTP/1.1 · 10 conn. 6.0 % HTTP/2 19.2 % HTTP/3 8.5 % How late: typical update (lowest to highest run) · slowest 1 % HTTP/1.1 31 µs (29–33 µs) · 250 ms HTTP/2 15.4 ms (5.70–30.8 ms) · 252 ms HTTP/3 58 µs (55–91 µs) · 214 ms TCP delivers bytes in order, so one lost packet stops every stream on the connection until it is resent. QUIC orders bytes per stream: the other nine keep arriving on time.
10 streams, each receiving a 200-byte update every 50 ms (staggered, so each packet carries one stream's update), for 20 s; how late each update arrives beyond the link's one-way delay. HTTP/2 and HTTP/3: one connection; HTTP/1.1: one connection per stream. Median of 5 process runs, 20,000 updates per protocol; the link dropped a median of 33 packets per HTTP/2 run and 53 per HTTP/3 run (QUIC sent more, smaller packets). On the LAN and the 50 ms link without loss no update was more than 0.4 ms late at the 99th percentile.

Without loss, nothing is late on any protocol. With 1 % loss:

The share of updates more than 50 ms late is the noisier measure: HTTP/2’s is 2.3× HTTP/3’s by the medians, but larger in only 4 of the 5 runs; where the losses fall matters, so the runs spread from 12 to 41 % for HTTP/2 and from 5 to 19 % for HTTP/3. That is although the link dropped more of HTTP/3’s packets: 53 per run against 33, 1 % of what each sent, and QUIC sent 5,408 packets per run against HTTP/2’s 3,012, smaller ones. The slowest 1 % are similar on all three (250 ms, 252 ms, 214 ms late): an update whose own packet is lost waits for the retransmission on any transport. What QUIC removes is the waiting of everyone else.

One large download

On one already-open connection, one response that never ends, read for a fixed time, every byte checked:

Throughput of one download on one connection, per link: LAN, no added delay: HTTP/1.1 2,054 MB/s, HTTP/2 1,145 MB/s, HTTP/3 1,120 MB/s. 50 ms round trip: HTTP/1.1 38 MB/s, HTTP/2 42 MB/s, HTTP/3 60 MB/s. 200 ms round trip, 1 % loss: HTTP/1.1 0.17 MB/s, HTTP/2 0.21 MB/s, HTTP/3 0.20 MB/s. One large download: HTTP/1.1 fastest on the LAN (2,054 MB/s), HTTP/3 at 50 ms (60 MB/s); with 1 % loss no run exceeded 0.27 MB/s One connection, already open · megabytes per second HTTP/1.1 HTTP/2 HTTP/3 each link has its own scale · grey line: lowest to highest run LAN, no added delay HTTP/1.1 2,054 MB/s HTTP/2 1,145 MB/s HTTP/3 1,120 MB/s 50 ms round trip HTTP/1.1 38 MB/s HTTP/2 42 MB/s HTTP/3 60 MB/s 200 ms round trip, 1 % loss HTTP/1.1 0.17 MB/s HTTP/2 0.21 MB/s HTTP/3 0.20 MB/s On the LAN the software is the limit, and plain HTTP/1.1 over kernel TCP has the least of it. On slow links what counts is how fast the sender dares to grow its window: quic-go's grew faster at 50 ms, and with 1 % loss none grows far.
One connection, already open; one endless response read for 3 s on the LAN and 10 s and 20 s on the slow links, every byte checked. MB/s from the request to the cut-off, so the climb out of slow start is included. Median of 5 process runs; each link has its own scale.
Throughput of one download on one connection, per link: LAN, no added delay: HTTP/1.1 2,054 MB/s, HTTP/2 1,145 MB/s, HTTP/3 1,120 MB/s. 50 ms round trip: HTTP/1.1 38 MB/s, HTTP/2 42 MB/s, HTTP/3 60 MB/s. 200 ms round trip, 1 % loss: HTTP/1.1 0.17 MB/s, HTTP/2 0.21 MB/s, HTTP/3 0.20 MB/s. One large download: HTTP/1.1 fastest on the LAN (2,054 MB/s), HTTP/3 at 50 ms (60 MB/s); with 1 % loss no run exceeded 0.27 MB/s One connection, already open · megabytes per second HTTP/1.1 HTTP/2 HTTP/3 each link has its own scale · grey line: lowest to highest run LAN, no added delay HTTP/1.1 2,054 MB/s HTTP/2 1,145 MB/s HTTP/3 1,120 MB/s 50 ms round trip HTTP/1.1 38 MB/s HTTP/2 42 MB/s HTTP/3 60 MB/s 200 ms round trip, 1 % loss HTTP/1.1 0.17 MB/s HTTP/2 0.21 MB/s HTTP/3 0.20 MB/s On the LAN the software is the limit, and plain HTTP/1.1 over kernel TCP has the least of it. On slow links what counts is how fast the sender dares to grow its window: quic-go's grew faster at 50 ms, and with 1 % loss none grows far.
One connection, already open; one endless response read for 3 s on the LAN and 10 s and 20 s on the slow links, every byte checked. MB/s from the request to the cut-off, so the climb out of slow start is included. Median of 5 process runs; each link has its own scale.
One downloadLAN50 ms200 ms
1 % loss
HTTP/1.12,054 MB/s
2,045 MB/s–2,089 MB/s
38 MB/s
30 MB/s–38 MB/s
0.17 MB/s
0.10 MB/s–0.27 MB/s
HTTP/21,145 MB/s
1,140 MB/s–1,158 MB/s
42 MB/s
36 MB/s–56 MB/s
0.21 MB/s
0.15 MB/s–0.26 MB/s
HTTP/31,120 MB/s
1,095 MB/s–1,133 MB/s
60 MB/s
50 MB/s–65 MB/s
0.20 MB/s
0.17 MB/s–0.24 MB/s

On the LAN this measures software, since loopback has no bandwidth limit. HTTP/1.1 is fastest at 2,054 MB/s: it writes the body straight into TLS over TCP. HTTP/2 cuts it into frames and runs flow control on top, 1,145 MB/s; HTTP/3 does the same over QUIC, 1,120 MB/s, with every packet encrypted, acknowledged and paced in the server process instead of the kernel. The runs agree within a few percent (table above); HTTP/1.1 led in every run, and HTTP/2 stayed 1–4 % ahead of HTTP/3 in every run.

At 50 ms the transfer is mostly the climb out of slow start, the phase in which a new connection doubles its sending rate every round trip until a loss, and here the congestion controllers differ: quic-go’s reached 60 MB/s (the fastest in every run), the kernel’s TCP 42 MB/s under HTTP/2 and 38 MB/s under HTTP/1.1. On the lossy link all three collapse to a fraction of a megabyte per second: with 1 % loss a single loss-based congestion controller never opens its window far, whatever HTTP runs above it.

CPU per request

The same server process answers all three, so its own CPU time per request is a direct comparison. 20,000 requests for a 1 KiB object, from 16 workers, on open connections:

Server CPU time per request for a 1 KiB response on open connections: HTTP/1.1 · 16 connections 9.8 µs, HTTP/2 · 16 streams 17.9 µs, HTTP/3 · 16 streams 16.3 µs. Server CPU per megabyte of one large download: HTTP/1.1 489 µs, HTTP/2 909 µs, HTTP/3 1,109 µs, HTTP/3, no UDP GSO 1,981 µs. Server CPU per small request: 10 µs (HTTP/1.1), 18 µs (HTTP/2), 16 µs (HTTP/3); per megabyte HTTP/3 costs 1.2× HTTP/2 LAN · server process CPU time, user + system HTTP/1.1 HTTP/2 HTTP/3 grey line: lowest to highest run Per request, 1 KiB response HTTP/1.1 · 16 connections 9.8 µs HTTP/2 · 16 streams 17.9 µs HTTP/3 · 16 streams 16.3 µs Per megabyte of one large download HTTP/1.1 489 µs HTTP/2 909 µs HTTP/3 1,109 µs HTTP/3, no UDP GSO 1,981 µs Per small request HTTP/2 and HTTP/3 cost about the same, HTTP/3 a little under HTTP/2 in every run; HTTP/1.1, with no stream framing, less. Moving bulk data, QUIC does per packet in the server process what TCP does in the kernel, and costs more; without UDP GSO (packets handed to the kernel in batches), much more.
Server process CPU time (user + system, from getrusage) divided by requests served or megabytes sent, LAN. Requests: 20,000 for a 1 KiB object from 16 workers on open connections. Download: the LAN run of the previous figure. The server runs on two cores; median of 5 process runs. Loopback offloads off, as in every other cell; the offload table below switches them on.
Server CPU time per request for a 1 KiB response on open connections: HTTP/1.1 · 16 connections 9.8 µs, HTTP/2 · 16 streams 17.9 µs, HTTP/3 · 16 streams 16.3 µs. Server CPU per megabyte of one large download: HTTP/1.1 489 µs, HTTP/2 909 µs, HTTP/3 1,109 µs, HTTP/3, no UDP GSO 1,981 µs. Server CPU per small request: 10 µs (HTTP/1.1), 18 µs (HTTP/2), 16 µs (HTTP/3); per megabyte HTTP/3 costs 1.2× HTTP/2 LAN · server process CPU time, user + system HTTP/1.1 HTTP/2 HTTP/3 grey line: lowest to highest run Per request, 1 KiB response HTTP/1.1 9.8 µs HTTP/2 17.9 µs HTTP/3 16.3 µs Per megabyte of one large download HTTP/1.1 489 µs HTTP/2 909 µs HTTP/3 1,109 µs HTTP/3, no UDP GSO 1,981 µs Per small request HTTP/2 and HTTP/3 cost about the same, HTTP/3 a little under HTTP/2 in every run; HTTP/1.1, with no stream framing, less. Moving bulk data, QUIC does per packet in the server process what TCP does in the kernel, and costs more; without UDP GSO (packets handed to the kernel in batches), much more.
Server process CPU time (user + system, from getrusage) divided by requests served or megabytes sent, LAN. Requests: 20,000 for a 1 KiB object from 16 workers on open connections. Download: the LAN run of the previous figure. The server runs on two cores; median of 5 process runs. Loopback offloads off, as in every other cell; the offload table below switches them on.

For small requests HTTP/2 and HTTP/3 cost about the same, 17.9 µs and 16.3 µs of server CPU each; HTTP/1.1, which has no streams to frame and schedule, 9.8 µs. The runs agree closely (HTTP/3 from 16.2 to 17.4 µs). HTTP/1.1 cost the least in every run; HTTP/3 was a little under HTTP/2 in every run, within 10 % in 4 of them, so read them as “HTTP/2 and HTTP/3 about the same, HTTP/1.1 less”. Per megabyte of a large download the gap opens: 1,109 µs for HTTP/3 against 909 µs for HTTP/2, 1.2× as much. Moving data is where QUIC’s per-packet work in user space shows.

How much depends on the network stack’s offloads. Every other cell runs with loopback offloads off, so the byte counters are honest; quic-go still hands the kernel batches of packets with UDP generic segmentation offload (GSO), which the kernel splits in software. The table compares that with offloads on, which is closer to a real network card, and with quic-go’s GSO switched off (QUIC_GO_DISABLE_GSO=true):

LAN, loopbackOffloads off
(every other cell)
Offloads onOffloads off,
no UDP GSO
HTTP/2 download1,145 MB/s
909 µs/MB
1,538 MB/s
678 µs/MB
–
HTTP/3 download1,120 MB/s
1,109 µs/MB
1,090 MB/s
1,039 µs/MB
577 MB/s
1,981 µs/MB
HTTP/2 1 KiB requests63,767/s
17.9 µs each
64,575/s
17.5 µs each
–
HTTP/3 1 KiB requests59,533/s
16.3 µs each
60,779/s
16.4 µs each
60,693/s
16.2 µs each

Without GSO, quic-go makes one system call per packet and its download runs at 577 MB/s and costs 1,981 µs of CPU per megabyte, 1.8× as much as with it. Small requests do not notice (16.2 µs each): a 1 KiB response is one packet either way. With every offload on, TCP benefits more than QUIC: the kernel then passes 64 KB TCP segments through the stack as one, and HTTP/2 reaches 1,538 MB/s, HTTP/3 1,090 MB/s. If you run HTTP/3 on Linux, check that UDP GSO works on your path: it is the difference between a few percent and a multiple.

What this does not show

What the numbers say

Reproduce it

The harness is one Go program (server and client), a Dockerfile and a driver script. It builds one image, starts the server in the client’s network namespace, and runs every cell as a fresh client process:

./certs.sh                 # throwaway CA and ECDSA P-256 certificate for localhost
docker build -t hb3 .      # Go 1.27.2 + quic-go v0.63.0, runs a self-test of the body generator
./up.sh 4-7 2-3            # client cores, server cores
docker exec h3-net tc qdisc replace dev lo root netem delay 25ms limit 100000   # the 50 ms link
docker exec h3-net hb run -test setup -proto h3 -var 0rtt -n 5 -settle 300ms

Each run prints one JSON line with every timing sample, the bytes and packets counted, the server CPU, and the check results: responses received, corrupted and missing, and whether each connection resumed or used 0-RTT.

Questions? Let's Chat :)

protocols