Skip to content

Add support for GOAWAY draining events to support WebTransport#3465

Open
jesup wants to merge 1 commit into
users/jesup/exportkeyfrom
users/jesup/draining
Open

Add support for GOAWAY draining events to support WebTransport#3465
jesup wants to merge 1 commit into
users/jesup/exportkeyfrom
users/jesup/draining

Conversation

@jesup
Copy link
Copy Markdown
Member

@jesup jesup commented Mar 16, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 16, 2026 04:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds client-side WebTransport “draining” notifications in response to HTTP/3 GOAWAY, aligning behavior with the WebTransport-over-HTTP/3 spec’s graceful shutdown expectations.

Changes:

  • Emit WebTransportEvent::Draining { session_id } for all WebTransport sessions when the client receives GOAWAY.
  • Add helper APIs to identify WebTransport sessions and to inject GOAWAY frames in tests.
  • Add WebTransport tests covering GOAWAY behavior for both “active” and “rejected” sessions.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
neqo-http3/src/server.rs Adds a test-only helper to queue GOAWAY on all server connections.
neqo-http3/src/connection_server.rs Adds a test-only helper to queue a GOAWAY control frame on a server handler.
neqo-http3/src/connection_client.rs Emits WebTransportEvent::Draining when handling GOAWAY, before resetting rejected streams.
neqo-http3/src/connection.rs Adds webtransport_session_ids() helper to enumerate WebTransport session stream IDs.
neqo-http3/src/client_events.rs Introduces the new public WebTransportEvent::Draining variant.
neqo-http3/src/features/extended_connect/session.rs Exposes connect_type() on extended-connect sessions for filtering session kinds.
neqo-http3/src/features/extended_connect/webtransport_session.rs Adds (currently unused) draining state and related accessors/TODOs.
neqo-http3/src/features/extended_connect/tests/webtransport/sessions.rs Adds tests validating Draining + (non-)closure semantics around GOAWAY.

Comment thread neqo-http3/src/features/extended_connect/webtransport_session.rs Outdated
Comment thread neqo-http3/src/features/extended_connect/session.rs Outdated
@jesup jesup force-pushed the users/jesup/exportkey branch 3 times, most recently from cdf24cd to feb57f8 Compare March 17, 2026 15:21
@jesup jesup force-pushed the users/jesup/draining branch from 66d783f to 798edf9 Compare March 17, 2026 15:32
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.07%. Comparing base (515d026) to head (b22beda).

Additional details and impacted files
@@                    Coverage Diff                    @@
##           users/jesup/exportkey    #3465      +/-   ##
=========================================================
+ Coverage                  95.04%   95.07%   +0.02%     
=========================================================
  Files                        116      116              
  Lines                      38628    38659      +31     
  Branches                   38628    38659      +31     
=========================================================
+ Hits                       36715    36754      +39     
+ Misses                      1218     1208      -10     
- Partials                     695      697       +2     
Flag Coverage Δ
freebsd 94.23% <100.00%> (+<0.01%) ⬆️
linux 95.23% <100.00%> (+0.02%) ⬆️
macos 95.17% <100.00%> (+0.02%) ⬆️
windows 95.21% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
neqo-common 98.61% <ø> (ø)
neqo-http3 93.97% <100.00%> (+0.01%) ⬆️
neqo-qpack 95.62% <ø> (ø)
neqo-transport 95.90% <ø> (+0.03%) ⬆️
neqo-udp 84.69% <ø> (ø)
mtu 86.61% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder whether a single draining event code path isn't a bit cleaner and easier for the consuming application. See comment below.

Comment thread neqo-http3/src/connection_client.rs Outdated
Comment thread neqo-http3/src/server.rs Outdated
@larseggert larseggert added the needs-rebase PR needs rebasing before it can be merged. label Apr 8, 2026
@jesup jesup force-pushed the users/jesup/exportkey branch 6 times, most recently from afd9b26 to 315089a Compare April 28, 2026 21:31
@jesup jesup changed the base branch from users/jesup/exportkey to temp_downgrade_nss April 29, 2026 02:46
@jesup jesup force-pushed the users/jesup/draining branch from 798edf9 to 1a5f003 Compare April 29, 2026 02:46
@jesup
Copy link
Copy Markdown
Member Author

jesup commented Apr 29, 2026

ignore the downgrade bit, sorry. annoyances building; I have a temp patch for that

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 29, 2026

Merging this PR will improve performance by 3%

⚡ 1 improved benchmark
✅ 22 untouched benchmarks
🗄️ 1 archived benchmark run1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation coalesce_acked_from_zero 1+1 entries 3 µs 2.9 µs +3%

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing users/jesup/draining (b22beda) with users/jesup/exportkey (515d026)

Open in CodSpeed

Footnotes

  1. 1 benchmark was run, but is now archived. If it was deleted in another branch, consider rebasing to remove it from the report. Instead if it was added back, click here to restore it.

@jesup jesup changed the base branch from temp_downgrade_nss to users/jesup/exportkey April 29, 2026 03:16
@jesup jesup force-pushed the users/jesup/draining branch from 1a5f003 to 496a483 Compare April 29, 2026 03:16
@jesup jesup force-pushed the users/jesup/exportkey branch from cd1f34c to 0626e18 Compare April 29, 2026 03:47
@jesup jesup force-pushed the users/jesup/exportkey branch from 091e626 to f5b1f79 Compare May 23, 2026 13:14
@jesup jesup force-pushed the users/jesup/draining branch from bd4f72d to 15a9465 Compare May 23, 2026 13:15
@jesup jesup force-pushed the users/jesup/exportkey branch from f5b1f79 to 7ea062e Compare May 23, 2026 13:37
@jesup jesup force-pushed the users/jesup/draining branch from 15a9465 to dc1bae8 Compare May 23, 2026 13:37
@larseggert larseggert removed the needs-rebase PR needs rebasing before it can be merged. label May 27, 2026
@jesup jesup force-pushed the users/jesup/exportkey branch from 7ea062e to 2f74e3e Compare May 27, 2026 17:41
@jesup jesup force-pushed the users/jesup/draining branch from dc1bae8 to 63b6749 Compare May 27, 2026 17:41
@jesup jesup force-pushed the users/jesup/exportkey branch from 2f74e3e to fc122d4 Compare May 27, 2026 18:26
@jesup jesup force-pushed the users/jesup/draining branch from 63b6749 to 60bcf58 Compare May 27, 2026 18:26
Comment thread neqo-http3/src/server.rs Outdated
Comment thread neqo-http3/src/connection.rs Outdated
@jesup jesup force-pushed the users/jesup/exportkey branch from fc122d4 to 9b792fb Compare May 29, 2026 04:46
@jesup jesup force-pushed the users/jesup/draining branch from 60bcf58 to 2f2b85a Compare May 29, 2026 04:46
@jesup jesup force-pushed the users/jesup/exportkey branch from 9b792fb to 4d47a99 Compare May 30, 2026 05:42
@jesup jesup force-pushed the users/jesup/draining branch from 2f2b85a to 60541e7 Compare May 30, 2026 05:42
@jesup jesup force-pushed the users/jesup/exportkey branch from 4d47a99 to e7673f4 Compare June 2, 2026 13:24
@jesup jesup force-pushed the users/jesup/draining branch from 60541e7 to b4db298 Compare June 2, 2026 13:24
@jesup jesup requested a review from martinthomson June 2, 2026 19:00
@jesup jesup dismissed martinthomson’s stale review June 2, 2026 19:01

Re-requested; everything was resolved

Comment thread neqo-http3/src/features/extended_connect/tests/webtransport/sessions.rs Outdated
Comment thread neqo-http3/src/features/extended_connect/tests/webtransport/sessions.rs Outdated
Comment thread neqo-http3/src/features/extended_connect/tests/webtransport/sessions.rs Outdated
Comment thread neqo-http3/src/connection.rs Outdated
Comment thread neqo-http3/src/connection.rs
Comment thread neqo-http3/src/features/extended_connect/tests/webtransport/sessions.rs Outdated
@jesup jesup force-pushed the users/jesup/exportkey branch from e7673f4 to ec66fb7 Compare June 3, 2026 14:36
@jesup jesup force-pushed the users/jesup/draining branch from b4db298 to 32e0127 Compare June 3, 2026 14:36
@jesup jesup force-pushed the users/jesup/exportkey branch from ec66fb7 to 9b3eac1 Compare June 3, 2026 21:24
@jesup jesup force-pushed the users/jesup/draining branch from 32e0127 to e22c6dd Compare June 3, 2026 21:24
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

Failed Interop Tests

QUIC Interop Runner, client vs. server, differences relative to users/jesup/exportkey at 9b3eac1.

neqo-pr as clientneqo-pr as server
neqo-pr vs. go-x-net: BP BA
neqo-pr vs. haproxy: 🚀L1 BP BA
neqo-pr vs. kwik: BP BA
neqo-pr vs. lsquic: run cancelled after 20 min
neqo-pr vs. msquic: A L1 C1
neqo-pr vs. mvfst: A
neqo-pr vs. neqo: A
neqo-pr vs. nginx: BP BA
neqo-pr vs. ngtcp2: CM
neqo-pr vs. picoquic: A 🚀BP BA
neqo-pr vs. quic-go: A
neqo-pr vs. quic-zig: B
neqo-pr vs. quiche: BP BA
neqo-pr vs. s2n-quic: CM
neqo-pr vs. tquic: S BP BA
neqo-pr vs. xquic: A 🚀C1 ⚠️L1
aioquic vs. neqo-pr: 🚀C1 ⚠️L1 CM
go-x-net vs. neqo-pr: BP CM
kwik vs. neqo-pr: BP BA CM
msquic vs. neqo-pr: CM
mvfst vs. neqo-pr: Z A L1 C1 CM
neqo vs. neqo-pr: A
openssl vs. neqo-pr: LR M A CM
quic-go vs. neqo-pr: CM
quiche vs. neqo-pr: ⚠️C1 CM
quinn vs. neqo-pr: 🚀L1 ⚠️C1 V2 CM
s2n-quic vs. neqo-pr: 🚀B CM
tquic vs. neqo-pr: CM
xquic vs. neqo-pr: M CM
All results

Succeeded Interop Tests

QUIC Interop Runner, client vs. server

neqo-pr as client

neqo-pr as server

Unsupported Interop Tests

QUIC Interop Runner, client vs. server

neqo-pr as client

neqo-pr as server

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

Benchmark results

Significant performance differences relative to 9b3eac1.

streams/walltime/1000-streams/each-1-bytes: 💔 Performance has regressed by +1.4934%.
       time:   [11.667 ms 11.686 ms 11.706 ms]
       change: [+1.2614% +1.4934% +1.7380] (p = 0.00 < 0.05)
       Performance has regressed.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
streams-flow-controlled/walltime/1-streams/each-4194304-bytes: 💔 Performance has regressed by +1.4125%.
       time:   [33.271 ms 33.340 ms 33.420 ms]
       change: [+1.1335% +1.4125% +1.6885] (p = 0.00 < 0.05)
       Performance has regressed.
Found 3 outliers among 100 measurements (3.00%)
2 (2.00%) high mild
1 (1.00%) high severe
All results
transfer/1-conn/1-100mb-resp (aka. Download): No change in performance detected.
       time:   [165.89 ms 166.27 ms 166.65 ms]
       thrpt:  [600.05 MiB/s 601.45 MiB/s 602.82 MiB/s]
change:
       time:   [-0.2516% +0.0388% +0.3403] (p = 0.80 > 0.05)
       thrpt:  [-0.3391% -0.0387% +0.2522]
       No change in performance detected.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
transfer/1-conn/10_000-parallel-1b-resp (aka. RPS): Change within noise threshold.
       time:   [262.36 ms 264.35 ms 266.32 ms]
       thrpt:  [37.549 Kelem/s 37.829 Kelem/s 38.116 Kelem/s]
change:
       time:   [-2.6230% -1.5936% -0.5489] (p = 0.00 < 0.05)
       thrpt:  [+0.5519% +1.6195% +2.6937]
       Change within noise threshold.
transfer/1-conn/1-1b-resp (aka. HPS): No change in performance detected.
       time:   [38.457 ms 38.630 ms 38.825 ms]
       thrpt:  [25.756   B/s 25.887   B/s 26.003   B/s]
change:
       time:   [-0.6352% -0.0019% +0.6578] (p = 1.00 > 0.05)
       thrpt:  [-0.6535% +0.0019% +0.6393]
       No change in performance detected.
Found 12 outliers among 100 measurements (12.00%)
4 (4.00%) high mild
8 (8.00%) high severe
transfer/1-conn/1-100mb-req (aka. Upload): Change within noise threshold.
       time:   [168.55 ms 169.04 ms 169.62 ms]
       thrpt:  [589.55 MiB/s 591.59 MiB/s 593.29 MiB/s]
change:
       time:   [-1.1238% -0.5746% -0.1141] (p = 0.03 < 0.05)
       thrpt:  [+0.1142% +0.5779% +1.1366]
       Change within noise threshold.
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high severe
streams/walltime/1-streams/each-1000-bytes: No change in performance detected.
       time:   [573.33 µs 575.21 µs 577.46 µs]
       change: [-0.6268% +0.0400% +0.6749] (p = 0.90 > 0.05)
       No change in performance detected.
Found 9 outliers among 100 measurements (9.00%)
2 (2.00%) high mild
7 (7.00%) high severe
streams/walltime/1000-streams/each-1-bytes: 💔 Performance has regressed by +1.4934%.
       time:   [11.667 ms 11.686 ms 11.706 ms]
       change: [+1.2614% +1.4934% +1.7380] (p = 0.00 < 0.05)
       Performance has regressed.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
streams/walltime/1000-streams/each-1000-bytes: No change in performance detected.
       time:   [36.962 ms 37.005 ms 37.049 ms]
       change: [-0.1111% +0.0659% +0.2344] (p = 0.46 > 0.05)
       No change in performance detected.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
streams-flow-controlled/walltime/1-streams/each-4194304-bytes: 💔 Performance has regressed by +1.4125%.
       time:   [33.271 ms 33.340 ms 33.420 ms]
       change: [+1.1335% +1.4125% +1.6885] (p = 0.00 < 0.05)
       Performance has regressed.
Found 3 outliers among 100 measurements (3.00%)
2 (2.00%) high mild
1 (1.00%) high severe
streams-flow-controlled/walltime/10-streams/each-1048576-bytes: No change in performance detected.
       time:   [88.443 ms 88.758 ms 89.132 ms]
       change: [-0.0866% +0.5061% +1.0991] (p = 0.09 > 0.05)
       No change in performance detected.
Found 5 outliers among 100 measurements (5.00%)
3 (3.00%) high mild
2 (2.00%) high severe
transfer/walltime/pacing-false/varying-seeds: Change within noise threshold.
       time:   [19.039 ms 19.051 ms 19.064 ms]
       change: [-2.7681% -2.5779% -2.4351] (p = 0.00 < 0.05)
       Change within noise threshold.
Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) high mild
1 (1.00%) high severe
transfer/walltime/pacing-true/varying-seeds: Change within noise threshold.
       time:   [19.535 ms 19.548 ms 19.561 ms]
       change: [-3.1764% -3.0619% -2.9523] (p = 0.00 < 0.05)
       Change within noise threshold.
Found 3 outliers among 100 measurements (3.00%)
2 (2.00%) high mild
1 (1.00%) high severe
transfer/walltime/pacing-false/same-seed: Change within noise threshold.
       time:   [19.280 ms 19.293 ms 19.307 ms]
       change: [-1.7067% -1.5943% -1.4884] (p = 0.00 < 0.05)
       Change within noise threshold.
Found 3 outliers among 100 measurements (3.00%)
1 (1.00%) low mild
1 (1.00%) high mild
1 (1.00%) high severe
transfer/walltime/pacing-true/same-seed: Change within noise threshold.
       time:   [19.566 ms 19.580 ms 19.593 ms]
       change: [-2.7472% -2.5627% -2.4236] (p = 0.00 < 0.05)
       Change within noise threshold.
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mild

Download data for profiler.firefox.com or download performance comparison data.

@jesup jesup force-pushed the users/jesup/exportkey branch from 9b3eac1 to 515d026 Compare June 4, 2026 14:36
@jesup jesup force-pushed the users/jesup/draining branch from e22c6dd to b22beda Compare June 4, 2026 14:36
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

Client/server transfer results

Performance differences relative to 515d026.

Transfer of 33554432 bytes over loopback, min. 100 runs. All unit-less numbers are in milliseconds.

Client vs. server (params) Mean ± σ Min Max MiB/s ± σ Δ baseline Δ baseline
neqo-neqo-newreno 80.5 ± 2.3 75.8 88.2 397.3 ± 13.9 💚 -1.0 -1.2%

Table above only shows statistically significant changes. See all results below.

All results

Transfer of 33554432 bytes over loopback, min. 100 runs. All unit-less numbers are in milliseconds.

Client vs. server (params) Mean ± σ Min Max MiB/s ± σ Δ baseline Δ baseline
google-google-nopacing 458.2 ± 1.4 455.2 463.5 69.8 ± 22.9
google-neqo-cubic 265.7 ± 2.3 261.4 270.9 120.4 ± 13.9 -0.3 -0.1%
msquic-msquic-nopacing 142.0 ± 47.5 111.8 345.6 225.3 ± 0.7
msquic-neqo-cubic 176.3 ± 54.8 116.7 456.9 181.5 ± 0.6 9.7 5.8%
neqo-google-cubic 768.8 ± 2.4 761.8 776.8 41.6 ± 13.3 0.1 0.0%
neqo-msquic-cubic 146.0 ± 1.6 143.7 151.9 219.2 ± 20.0 -0.4 -0.3%
neqo-neqo-cubic 81.1 ± 2.6 77.0 90.7 394.7 ± 12.3 0.0 0.0%
neqo-neqo-cubic-nopacing 80.1 ± 2.6 75.6 87.7 399.6 ± 12.3 -0.5 -0.6%
neqo-neqo-newreno 80.5 ± 2.3 75.8 88.2 397.3 ± 13.9 💚 -1.0 -1.2%
neqo-neqo-newreno-nopacing 80.2 ± 2.3 76.0 86.0 398.8 ± 13.9 0.1 0.1%
neqo-quiche-cubic 191.2 ± 2.3 186.7 197.0 167.4 ± 13.9 -0.1 -0.0%
neqo-s2n-cubic 214.0 ± 1.7 208.9 218.7 149.5 ± 18.8 -0.0 -0.0%
quiche-neqo-cubic 183.3 ± 2.8 175.6 188.6 174.6 ± 11.4 -0.4 -0.2%
quiche-quiche-nopacing 137.9 ± 3.4 133.1 155.9 232.1 ± 9.4
s2n-neqo-cubic 216.6 ± 3.7 208.3 225.5 147.8 ± 8.6 0.0 0.0%
s2n-s2n-nopacing 295.5 ± 29.7 278.8 387.7 108.3 ± 1.1

Download data for profiler.firefox.com or download performance comparison data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants