Envoy performance · part 5 of 6
Envoy TLS handshakes and HTTP/3: what connections cost in CPU
By Otto van der Schaaf, We-Amp ·
A new connection costs a proxy CPU before it serves a single byte, and the protocol it speaks to the upstream costs CPU on every request after that. This post prices both for Envoy v1.40.2: a new plaintext or TLS 1.3 connection, the certificate type, the post-quantum key exchange, session resumption and TCP_DEFER_ACCEPT, then HTTP/2, the oghttp2 codec, TLS and mutual TLS towards the upstream, and a unary gRPC call, and last HTTP/3 against HTTP/2 over TLS. It is a companion to the Envoy price list and uses its method: paired runs in a balanced order, a fixed request rate, CPU cycles of the proxy process divided by the responses it served, and an A/A check in every priced run. It is one machine and loopback networking, so read every figure as a price on that rig. The other posts of the series are listed on Envoy performance, measured.
Key findings
- A new TLS 1.3 connection costs 1,145k cycles with an ECDSA P-256 certificate and 3,054k with RSA-2048, so with ECDSA it is about 2.7 times cheaper. One request per connection at 800 req/s, on this machine and over loopback; only the user-space part (840k and 2,753k) carries over to other machines.
- The default post-quantum key exchange (X25519MLKEM768) costs about 150k cycles per full handshake more than X25519 alone: about 13% of an ECDSA TLS connection.
- Session resumption with an ECDSA certificate made no measurable CPU difference (+0.7% [−0.1, +1.6] per request, every client resuming). On a real network it still saves a round trip.
TCP_DEFER_ACCEPTmade no measurable CPU difference (−0.5% [−1.4, +0.3]) with clients that send their request straight away. Clients that connect and then wait, the case it is meant for, were not measured.- Upstream protocol, warm connections at 5,200 req/s with two to three requests in flight: HTTP/2 instead of HTTP/1.1 over TLS +5.1%; the oghttp2 codec instead of nghttp2 +5.1% (+8.7% on a gRPC proxy, 14% and 27% more instructions); mutual TLS between two proxies +6.4% of the pair, about 6% per encrypted side.
- HTTP/3 instead of HTTP/2 over TLS costs about +75% CPU per request [+72.2, +77.4] on 16 long-lived connections at 2,000 req/s, likely a little more at even worker load, and the UDP GSO default saves about 6%. A new QUIC connection costs about 3.4M cycles over its whole life (Envoy ends it after 10 requests), probably 3.0M to 3.2M at even worker load; that figure covers ten requests and the close, so it does not compare directly with the per-connection TCP prices above, measured at one request per connection. Loopback, low load, and a 2016 Xeon with page-table isolation, where kernel calls cost more than on a current CPU.
What to do: with the default key exchange, an ECDSA certificate gave the cheapest TLS connection measured here, and oghttp2 cost more than nghttp2 here, in line with its default of off in v1.40.2.
The price of a new connection
| Connection or setting | Rate | Cycles per new connection [95% interval] | Of which user space | CPU per request at one request per connection [95% interval] | Basis |
|---|---|---|---|---|---|
| Plaintext, against keep-alive | 1,600 req/s | 239k [232k, 246k]; second session 240k [236k, 245k] | 86k | +37.8% [+36.5, +39.2] | Measured |
| TLS 1.3, full handshake, ECDSA P-256 certificate, against TLS keep-alive | 800 req/s | 1,145k [1,137k, 1,153k] | 840k | +160.7% [+158.6, +162.8] | Measured |
| TLS 1.3, full handshake, RSA-2048 certificate, against TLS keep-alive | 800 req/s | 3,054k [3,046k, 3,061k] | 2,753k | +428.5% [+424.2, +432.8] | Measured |
| RSA-2048 instead of ECDSA P-256, per full handshake | 800 req/s | +1,909k [+1,900k, +1,917k] | +1,912k | +102.7% [+101.2, +104.2] | Measured |
| Key exchange X25519MLKEM768 (the default) instead of X25519 alone, ECDSA, per full handshake | 800 req/s | +149k [+139k, +158k] | +149k | with X25519 alone: −8.0% [−8.7, −7.3] | Measured |
| Session resumption on and every client resuming, against resumption off, ECDSA | 800 req/s | +13k ± 12k, inside the A/A floor of about 15k | +10k | +0.7% [−0.1, +1.6], no measurable difference | Measured |
TCP_DEFER_ACCEPT of 1 s on the listener, plaintext, client sends its request at once |
1,600 req/s | −4.5k [−9.9k, +0.9k] | −0.5k | −0.5% [−1.4, +0.3], no measurable difference | Measured |
Conditions:
- Three sessions on 22 November 2026 with the official v1.40.2 binary: the main run for plaintext and TLS (6 rounds each), a second plaintext run with
TCP_DEFER_ACCEPTand a repeat of the plaintext price (8 rounds), and a short check run for the HelloRetryRequest count and the two observations further down. - The machine of the price list: a 2016 dual-socket Intel Xeon E5-2673 v4 server at a fixed 2.3 GHz, turbo off, the proxy pinned to four cores of one socket with 4 workers, client and origin on the other socket.
- HTTP/1.1 from the client, 4 KB proxied responses from an nginx origin whose connections to the proxy stayed alive in every arm. Each comparison is one request per new connection against keep-alive connections at the same rate: 1,600 req/s for plaintext, 800 req/s for TLS.
- The client spreads its connections over 16 loopback addresses of one listener. That is how this rig avoids running out of ports and TIME_WAIT slots at these rates; the keep-alive arms use the same listener.
- Envoy’s default connection balancing, without
exact_balance, unlike the rest of the price list. - Low load: the proxy was 8% to 33% busy. The plaintext keep-alive reference cost 632k cycles per request, against 524k to 527k for the same response at 5,200 req/s with
exact_balancein the price list. - Each priced run in a balanced (Williams) order: every arm in every position, and after every other arm, equally often. Every priced leg passed the validity gate with no check switched off. Here the gate also required one new connection per request (by Envoy’s listener count and by the kernel’s count of passive opens), only the expected TLS version and key exchange, at least 99.99% of handshakes resumed in the resumption arm and none elsewhere, and no listen overflow, listen drop or SYN retransmit.
- A/A: +0.18% [−0.81, +1.18] for plaintext and +0.28% [−0.50, +1.07] for TLS per request, about 7k and 15k cycles per connection; −0.06% [−0.95, +0.84] in the second plaintext run.
- Per-request intervals are the wider of the plain interval and the one with the between-session spread; cycle intervals are plain 95% intervals over the paired rounds. Every TLS handshake was TLS 1.3, with X25519MLKEM768 unless a row says otherwise.
Cycles are the price. From the proxy’s task clock, a plaintext connection takes about 0.1 ms of CPU on this machine, an ECDSA one about 0.52 ms and an RSA-2048 one about 1.3 ms. Only the user-space column carries over to other machines: on loopback the kernel part includes some of the client’s work and the host’s connection tracking, and the test client closed TLS connections abruptly and plaintext ones normally. For the same reasons the plaintext row should not be subtracted from a TLS row; the TLS rows compare cleanly with each other. The keep-alive arms ran least busy, and on this machine a less busy core costs more per request, so these prices are, if anything, slightly understated; that effect is not in the intervals.
RSA, ECDSA and the key exchange
The RSA-2048 signature costs about 1.9M cycles per full handshake, all in user space, so with an ECDSA certificate a new TLS connection is about 2.7 times cheaper (1.15M against 3.05M cycles); the handshake alone gains more. That is 12% to 14% above the price list’s settings row (1.68M, at ten requests per connection), with the same 6.0M added user-space instructions per RSA handshake. The rest of the gap lies in the kernel and in the different setups, not in more cryptographic work.
The default post-quantum hybrid key exchange costs about 150k cycles per full handshake more than X25519 alone, all in user space: about 13% of an ECDSA TLS connection, or 8% per request at one request per connection. It is the price of the default post-quantum protection. A check with the same load generator counted no HelloRetryRequest in either configuration (0 of 120 connections each, while a control that forces one counted 120 of 120), so the row prices the key exchange, not an extra round trip. With the default key exchange, ECDSA gave the cheapest TLS connection measured here, with or without resumption; only a listener restricted to X25519 was cheaper (997k cycles).
Session resumption with an ECDSA certificate
Resumption made no measurable CPU difference in either direction. The resumed arm did resume, at least 99.99% of handshakes at the server. X25519MLKEM768 was counted on every resumed handshake, in line with BoringSSL’s TLS 1.3 server, which resumes only with a fresh key exchange. A resumed handshake skips the certificate and the signature, and adds ticket decryption, the binder check and more key-schedule steps. The full-handshake arm had both resumption modes disabled and issued no tickets, while the resumed arm issued one on every connection, so the row compares resumption on, with every client resuming, against resumption off. A full handshake with resumption on was not priced. On a real network resumption also saves a round trip.
TCP_DEFER_ACCEPT
A 1 s TCP_DEFER_ACCEPT made no measurable CPU difference with a client that sends its request right after connecting, at about 17% busy. The kernel’s host-wide count of ignored bare ACKs equalled the passive opens, so all 16 addresses deferred, and it read 0 in every other arm. The wait only spans the microseconds between the handshake’s final ACK and the request, and context switches per request stayed level (2.990 against 2.987). Clients that connect and wait before sending, where the option is meant to help, were not measured. The median latency rose on loopback with the option, by about 13% (about 55 µs). A later check found that this is not caused by deep CPU idle states: the rise was the same in absolute terms with them disabled. Its cause is not established, and the option still had no CPU effect.
Shared listen socket and exact_balance under connection churn
Two more listener configurations ran under the same plaintext churn: 1,600 one-request connections per second over the 16 addresses, 4 workers, one round and its automatic repeat. Both failed the check that the load is spread evenly over the workers, so neither has a CPU price. Basis: exploratory.
- A shared listen socket (
enable_reuse_port: false). The busiest worker did about 0.47 of the worker CPU and the least busy about 0.06; the busiest differed between the two runs, and workers 0 and 1 were the least busy in both. Context switches per request doubled, 6.0 against 3.0. About three more per connection is what waking every idle worker for each new connection would give; we did not trace it. Envoy’s documentation says the default,enable_reuse_port: true, spreads connections more evenly when connection volume is high, and this agrees.max_connections_to_accept_per_socket_eventwas not tried. exact_balancewith short-lived connections. One worker did about 87% of the worker CPU in both runs, and the other three mostly accepted connections and handed them on (context switches per request 3.7 against 3.0). In the v1.40.2 source (connection_balancer_impl.cc) there is one exact balancer per listener address. It sends each new connection to the worker with the fewest open connections on that address and gives ties to the first registered worker. Here each address received about 100 new connections per second, each open for under half a millisecond, so nearly every pick found every worker at zero and the first worker won. That needs the connections open per address at any moment to be well below the worker count, which the 16 addresses made likely. With a single address, or with lifetimes that include network round trips, we expect the load to spread more. Envoy’s documentation scopes the option to a small number of connections that rarely cycle, and this traffic is outside that scope. The closed Envoy issues #15146 and #16113 describe a related, since-fixed counting issue with the same first-worker outcome; in v1.40.2 the counts are correct, and here they are zero. v1.40.2 also offerscpu_locality_balance(since v1.39), which was not measured here.
The data for both sections is in the harness repository at tag waves-2026-11: the configuration in examples/wave3e, the run notes in docs/wave-studies.md and the raw data in the release archive waves-2026-11-data-connection-churn.tar.gz (checksums in SHA256SUMS).
Upstream HTTP/2, gRPC and mTLS
| Setting (against the configuration named) | Traffic | CPU per request [95% interval] | Basis |
|---|---|---|---|
| HTTP/2 to the upstream instead of HTTP/1.1, both over TLS to the same nginx server | HTTP/1.1 client, 4 KB proxied | +5.1% [+4.3, +5.8] | Measured |
| oghttp2 instead of nghttp2 as the upstream HTTP/2 codec, cleartext HTTP/2 upstream | same | +5.1% [+4.0, +6.2] | Measured |
| Upstream TLS on warm connections, HTTP/1.1, against plaintext to the same origin | same | +2.9% [+2.0, +3.9], depends on the origin | Measured |
| A second proxy (client → proxy → proxy → origin), against one proxy (repeats the price list’s +99.6%) | same, one upstream pool per downstream connection on every proxy | +98.7% [+96.6, +100.9] for the pair | Measured |
| Mutual TLS on warm connections between the two proxies, against the plaintext pair | same | +6.4% [+5.6, +7.2] of the pair | Measured |
| oghttp2 instead of nghttp2, downstream and upstream | unary gRPC, HTTP/2 on both sides | +8.7% [+6.3, +11.2] | Measured |
grpc_stats filter with stats_for_all_methods: true (the lower end is inside this run’s A/A reach) |
same | about +6% [+2.8, +9.5] | Measured |
Conditions:
- One session on 22 November 2026 with the official v1.40.2 binary on the same machine, 4 workers,
exact_balanceon the listeners as in the price list, 5,200 req/s, 4 KB responses from an nginx origin, loopback. - Three runs, each in a balanced (Williams) order: 6 rounds for the upstream-protocol rows, 8 for the two-proxy rows and 8 for the gRPC rows. Every leg passed the validity gate with no check switched off. A/A: +0.26% [−0.76, +1.29], +0.08% [−0.72, +0.88] and +0.62% [−2.48, +3.82]. The gRPC run’s A/A is wide, so its smaller effects carry less weight.
- Intervals are the wider of the plain interval and the one with the between-session spread.
- Warm upstream connections: no new upstream connection and no handshake in any measurement window.
- Upstream TLS was TLS 1.2, the default maximum of Envoy’s TLS client in v1.40.2, with ECDHE-ECDSA-AES128-GCM-SHA256 and X25519 (X25519MLKEM768 heads the client’s list but needs TLS 1.3), and ECDSA P-256 certificates.
- The gRPC rows use another client and downstream protocol than the rows above and do not compare with them.
The second-proxy row prices an HTTP hop. Envoy tcp_proxy vs HTTP proxy prices the same hop as tcp_proxy, and what it gives up.
HTTP/2 to the upstream
Over TLS, HTTP/2 to the upstream costs +5.1%: about 27k more user-space cycles per request on about 3k more instructions, with the kernel unchanged, so nearly all of it is lower instructions per cycle. We did not trace the cause. HTTP/2 cuts the upstream connections from 358 to 511 to 4, one per worker. At this rate and latency only two to three requests are in flight across the whole proxy (Little’s law, from the median and the mean latency), a load at which multiplexing has little to pay back; higher concurrency was not measured.
Against a cleartext (h2c) nginx origin we measured +12% [+11.0, +13.3]. That arm ran at a different operating point on every leg: 99th-percentile latency of 2.7 to 3.4 ms against 0.74 to 0.81 ms over TLS, and fewer context switches per request. Most of its extra user-space cycles were stalls. The same h2c server block with gRPC framing showed no such shift (99th percentile 0.64 ms), which points at the response shape or at nginx’s write path. We have not explained it, so the cleartext figure describes Envoy with this origin, not Envoy’s HTTP/2 upstream alone.
oghttp2 against nghttp2
The oghttp2 codec (runtime key envoy.reloadable_features.http2_use_oghttp2, off by default in v1.40.2) costs more than nghttp2: +5.1% with an HTTP/2 upstream only, about 28k cycles per request. User-space instructions rose 14% at about 6% higher instructions per cycle, so the extra is added work. Both arms of that row ran against the cleartext origin, with the latency shift described above; the instruction count carries the result. On a gRPC proxy, where the key switches the downstream and the upstream codec together, oghttp2 costs +8.7% with 27% more user-space instructions; that run does not split the two sides. The source comment beside the key says to flip it back on once performance aligns with nghttp2 and an open latency report is resolved, and these rows agree with the current default. Measured with 4 upstream connections, small response headers and one DATA frame per response.
Encryption on the upstream and between proxies
Warm upstream TLS against the nginx origin costs +2.9% net: about 28k more user-space cycles per request, offset by 12k fewer kernel cycles that come from how the origin delivers TLS records.
Between two proxies, with nginx on neither end, mutual TLS adds +6.4% to the pair: about 69k cycles per request, or 13% of one proxy. It splits evenly between the proxy that opens the connection (+35k cycles per request, +6.8%) and the one that accepts it (+33k, +6.1%), almost all in user space (medians). That puts warm TLS at about 30k cycles per request per encrypted side, about 6% of one proxy, in line with the user-space part of the nginx row. On warm connections the second proxy costs far more than the encryption on the link to it. Per proxy, the first one spent about 12k fewer kernel cycles when its upstream was Envoy instead of nginx, so read the doubling as about one proxy’s worth. Handshakes, TLS 1.3 and bodies larger than 4 KB, where encryption cost grows with the bytes, are not in this figure; the price of a new connection covers TLS 1.3 handshakes from the client.
Unary gRPC
A proxied unary gRPC call costs about 712k cycles (≈320 µs of CPU on this machine), the median over the run: an HTTP/2 client on 16 connections, cleartext HTTP/2 to the origin over 4 connections, a 66-byte request and a 4,096-byte response with its trailers. grpc_stats with stats_for_all_methods: true costs about +6% per call; its 13% rise in user-space instructions (+29k per call) agrees with the cycles. Its default form, without method names, and streaming gRPC were not measured.
The data for this section is in the harness repository at tag waves-2026-11: the configuration in examples/wave3f, the run notes in docs/wave-studies.md and the raw data in the release archive waves-2026-11-data-upstream-protocols.tar.gz (checksums in SHA256SUMS).
HTTP/3 against HTTP/2 over TLS
| Row | Price [95% interval] | Basis |
|---|---|---|
| HTTP/3 instead of HTTP/2 over TLS, per request, long-lived connections, no handshakes in the window | about +75% [+72.2, +77.4] (1.75×): +543k cycles per request, of which +432k in user space; likely a little more at even worker load | Measured |
| UDP GSO off, against the default (on), HTTP/3 per request | about +6% (+6.4% [+4.0, +8.7] as scored; +80k cycles per request): the default saves about 6% | Measured |
| A new HTTP/3 connection, Envoy ending each connection after 10 requests | about 3.4M cycles [3.2M, 3.6M] (+4.5M user instructions); +26.9% per request [+25.2, +28.7] against long-lived connections; probably about 3.0M to 3.2M at even worker load | Measured |
Runtime key envoy.reloadable_features.quic_session_ticket_support on, with a configured session_ticket_keys, against the default, reconnecting every 10 requests |
−0.66% per request [−1.4, +0.1], no measurable difference: at most about 0.2M cycles cheaper per connection, and not measurably dearer | Measured |
| The first row repeated in a later session (23 November 2026), 4 KB response | +77.6% [+73.3, +82.0] (+557.6k cycles per request, of which +438.4k in user space). It agrees: the first row’s figure lies inside the repeat’s interval | Measured |
| Reading UDP packets, as a share of Envoy’s worker cycles with HTTP/3 at 4 KB | 11.3%; 2 of 4 recvmmsg calls per request return EAGAIN; 17.4 syscalls per request against 11.0 with HTTP/2 over TLS |
Measured [mechanism] |
| The premium on a 0-byte response, as a share of the 4 KB premium | 74% to 80%, depending on which HTTP/3 copy and which rounds are counted; every interval crosses our 80% threshold. The 0-byte traffic failed its same-build check, so its premium has no price, only a size: +62% to +67% | Not resolved |
Conditions:
- Two sessions on 22 November 2026 with the official v1.40.2 binary on the price list’s machine, 4 workers, defaults. GET with a 4 KB response proxied to an HTTP/1.1 origin, 2,000 req/s, loopback, TLS 1.3 on both protocols with an ECDSA P-256 certificate.
- The client is Envoy’s own QUIC client, with 16 client workers and one long-lived connection each; it never sends 0-RTT data. The HTTP/2 arm negotiated TLS_AES_128_GCM_SHA256 with X25519MLKEM768; the QUIC cipher and key-exchange group are not observable here.
- Low load: HTTP/2 at 17% busy, long-lived HTTP/3 at 28% to 30%, reconnecting HTTP/3 at 36%.
- 8 rounds per run in a balanced (Williams) order. In each run one round was replaced once, by the harness’s rule for an invalid leg. Every scored leg passed the validity gate, with two changes set before the runs: Envoy’s connection balancer does not apply to QUIC listeners (each connection’s packets are steered to one worker by its connection ID), so the 16 HTTP/3 connections landed on the workers unevenly, and the long-lived HTTP/3 arms were gated at a busiest worker of at most half the worker CPU instead of the usual spread check; and in the reconnecting arms, where requests held for a new handshake reach the origin together, up to 0.005 new origin connections per request were allowed in the window instead of 0.001. A/A: +0.33% [−2.34, +3.07] in the protocol run, +0.16% [−0.77, +1.09] in the reconnect run.
- Per-request intervals are the wider of the plain interval and the one with the between-session spread; the per-connection interval is a plain interval over the rounds.
HTTP/3 instead of HTTP/2 over TLS costs about +75% Envoy CPU per request on long-lived connections. Of the extra cost, +432k cycles are in user space (+86%; user instructions 2.55×). The rest is kernel time on loopback, which does not carry over to a NIC. It is also kernel time on a 2016 Xeon with page-table isolation, where each kernel call costs more than on a current CPU, and HTTP/3 made more of them: 17.4 syscalls per request against 11.0 with HTTP/2 over TLS. On loopback a 4 KB HTTP/2 response can travel as one TCP segment, while the machine carried about 7 UDP datagrams per 4 KB HTTP/3 request in the later session; a real network narrows that difference. Two effects mean the premium is, if anything, somewhat larger than shown: HTTP/2 ran at lower load, where this machine charges more per request, and the uneven HTTP/3 worker load makes each HTTP/3 request slightly cheaper.
The UDP GSO default saves about 6% of HTTP/3’s per-request CPU. About 60% of the saving is in user space (fewer write calls). The rest is kernel time on loopback, where a real NIC path behaves differently. Leave GSO on; it is the default.
A new HTTP/3 connection costs about 3.4M Envoy cycles, almost all of it (+3.2M) in user space. Envoy ends each connection after 10 requests (max_requests_per_connection, GOAWAY) and the client reconnects, so the figure covers the whole connection lifecycle, from handshake to close. The long-lived reference connections were spread unevenly over Envoy’s workers, which on this machine makes each request slightly cheaper, so the per-connection figure is probably a little high: about 3.0M to 3.2M at even load.
Turning on the runtime key envoy.reloadable_features.quic_session_ticket_support with a configured session_ticket_keys made no measurable CPU difference. The client offered a session ticket on every reconnect in both cases; how many the server accepted was not observed in this run. In the v1.40.2 source, the guard alone, without a configured key, turns resumption off; that case was not measured.
A repeat, and how much of the premium is paid per packet
A session on 23 November 2026 repeated the first row and asked a second question. Conditions: the setup of that row (16 long-lived connections, 2,000 req/s, low load), 6 rounds, the same-build check at 4 KB −0.44% [−3.00, +2.19]. One round of the 4 KB traffic was replaced once, by a rule fixed before the run (an HTTP/3 run’s busiest worker measured 50.4% against the limit of 50.0%); with the original runs the row is +75.49% [+70.27, +80.87] (Exploratory). Measured [mechanism] marks a count or a profile share from one extra run under a tracer or profiler, never a price.
The 4 KB premium reproduced: +77.6% [+73.3, +82.0], or +557.6k cycles per request (+438.4k in user space), against +543k (+432k) in the first row. The headline stays about +75%. As in the first row, uneven HTTP/3 worker load makes HTTP/3 slightly cheaper per request here, so the premium is, if anything, understated.
The second question: how much of the premium is paid per request, and how much per packet? Before the run we set a threshold: a premium on a 0-byte response at or above 80% of the 4 KB premium would mean packets are not the lever. The answer is Not resolved. The share is 78.4% [73.1, 83.6] with one HTTP/3 copy, 74.1% [63.8, 84.3] with the second copy, 76.1% [70.8, 81.5] pooled, and 80.1% [72.8, 87.5] with the original runs of the replaced round. The 0-byte traffic also failed its same-build check (−2.77% [−7.62, +2.33], 2.81 log points against a limit of 2.0). We did not re-run it.
Some counts do not depend on that check. Machine-wide UDP datagrams per request go from 3.99 at 0 bytes to 7.03 at 4 KB. One profile puts the receive path at 11.3% of worker cycles: the recvmmsg call itself is 4.4%, the rest is buffer set-up and tear-down around it. The estimate of the per-packet part (+120k to +145k cycles for 3 more datagrams) is Exploratory and uses the traffic that failed its check. Two departures from our plan apply to this session, as described in the price list: a login stayed open on the machine during the runs, and the order of the traffic shapes was fixed. The data for this session is in the harness repository at tag waves-2026-11d: the configuration in examples/wave7s2, the run notes in docs/wave-studies.md and the raw data in the release archive waves-2026-11d-data-bodies-streams.tar.gz (checksums in SHA256SUMS). A change to the receive path was measured in a later session: Reusing the receive buffers.
The data for the rows of 22 November is in the harness repository at tag waves-2026-11b: the configuration in examples/wave4g, the run notes in docs/wave-studies.md, the rendered tables per request and per connection, and the raw data in the release archive waves-2026-11b-data-http3.tar.gz (checksums in SHA256SUMS).
Reusing the receive buffers
A later session, on 24 November 2026, measured a patch of ours to that receive path: two changes to Envoy’s UDP read loop on v1.40.2, each behind its own runtime guard. One keeps the unused receive buffers of a read for the next one instead of building them again. The other ends the read loop after a short recvmmsg batch. The reuse commit is on our fork as the branch candidates/quic-udp-reuse.
| Comparison, inside one rebuilt binary | CPU per 4 KB HTTP/3 request [95% interval] | Basis |
|---|---|---|
| Receive-buffer reuse on, against off, the other change off in both; 16 connections, 2,000 req/s | −6.50% [−9.42, −3.48] | Measured |
The receive-buffer reuse commit alone saves 6.5% (3.5 to 9.4) of Envoy’s CPU per 4 KB HTTP/3 request (2,000 requests per second over 16 connections, inside one rebuilt binary, QUIC statistics on in every arm), with no excess of retransmissions detected (16 against 9 packets in about 3.4 million sent per arm; exact test p 0.23).
The other change, which ends the read loop after a short batch, is held: with it the server sent extra retransmissions that we have not yet explained from the code.
Limits. 8 rounds in a balanced order, with a same-build check that passed. Low load only: not measured under load, behind a NIC, on another kernel or another response size. Only unconnected listener sockets read through the default recvmmsg path are changed (not GRO, not recvmsg, not Envoy’s own HTTP/3 upstream connections, not CONNECT-UDP); Linux edge-triggered events only; one kernel (6.8); several workers reading one socket were not tested. The kept buffers cost memory per listener per worker, which was not measured. The address and thread sanitizer runs of its tests are still owed. The patch is not part of any Envoy release and has not been reviewed by the Envoy project. The data for this section is in the harness repository at tag waves-2026-11d: the configurations in examples/wave8w2 and examples/wave8tail, the run notes in docs/wave-studies.md, the rendered table of the reuse row docs/wave-tables/http3-receive/tail-w8-3/tail-table.md and the raw data in the release archive waves-2026-11d-data-http3-receive.tar.gz (checksums in SHA256SUMS).
Measured but not published
- CPU figures for a shared listen socket and for
exact_balanceunder connection churn, where the load was too uneven across workers to compare.
What this does not cover
- One machine, one release (v1.40.2), 4 workers and loopback only.
- Connection churn beyond one HTTP/1.1 request per connection at low load: HTTP/2 from the client, TLS 1.2 handshakes and new upstream connections.
- Client-side CPU, and kernel costs behind a network card.
- Upstream TLS 1.3 and upstream handshakes, HTTP/2 at higher concurrency per worker and streaming gRPC.
- For HTTP/3: 0-RTT, GRO, client-closed connections, many-connection HTTP/3, a NIC path and clients other than Envoy’s QUIC client.
If one of these figures does not match what you see, compare the conditions first.
Credit
Envoy’s listener, TLS, HTTP/2 and HTTP/3 code are the work of the Envoy project’s contributors; its HTTP/3 is built on the QUICHE library and its TLS on BoringSSL. Nothing here is a defect report. The measurements and any error in them are ours.