Skip to content

Add support for GOAWAY draining events to support WebTransport#3465

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

Add support for GOAWAY draining events to support WebTransport#3465
jesup wants to merge 1 commit intousers/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.
⚠️ Please upload report for BASE (users/jesup/exportkey@0626e18). Learn more about missing BASE report.

Additional details and impacted files
@@                   Coverage Diff                    @@
##             users/jesup/exportkey    #3465   +/-   ##
========================================================
  Coverage                         ?   94.38%           
========================================================
  Files                            ?      133           
  Lines                            ?    40275           
  Branches                         ?    40275           
========================================================
  Hits                             ?    38015           
  Misses                           ?     1408           
  Partials                         ?      852           
Flag Coverage Δ
freebsd 78.55% <ø> (?)
linux 94.52% <100.00%> (?)
macos 94.46% <100.00%> (?)
windows 94.52% <100.00%> (?)

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

Components Coverage Δ
neqo-common 98.61% <0.00%> (?)
neqo-crypto 86.49% <0.00%> (?)
neqo-http3 93.94% <0.00%> (?)
neqo-qpack 95.14% <0.00%> (?)
neqo-transport 95.60% <0.00%> (?)
neqo-udp 84.90% <0.00%> (?)
mtu 86.61% <0.00%> (?)

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

@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 not alter performance

✅ 24 untouched benchmarks
⏩ 27 skipped benchmarks1


Comparing users/jesup/draining (1f45777) with users/jesup/exportkey (b21b342)2

Open in CodSpeed

Footnotes

  1. 27 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on users/jesup/exportkey (0626e18) during the generation of this report, so 7e1e1ba was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@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
@github-actions
Copy link
Copy Markdown
Contributor

Benchmark results

Significant performance differences relative to 0626e18.

streams/walltime/1000-streams/each-1000-bytes: 💔 Performance has regressed by +1.3111%.
       time:   [45.146 ms 45.191 ms 45.237 ms]
       change: [+1.0108% +1.3111% +1.5450] (p = 0.00 < 0.05)
       Performance has regressed.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
All results
transfer/1-conn/1-100mb-resp (aka. Download): No change in performance detected.
       time:   [211.82 ms 212.26 ms 212.79 ms]
       thrpt:  [469.95 MiB/s 471.13 MiB/s 472.10 MiB/s]
change:
       time:   [-0.1417% +0.1860% +0.5078] (p = 0.27 > 0.05)
       thrpt:  [-0.5052% -0.1856% +0.1419]
       No change in performance detected.
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high severe
transfer/1-conn/10_000-parallel-1b-resp (aka. RPS): Change within noise threshold.
       time:   [286.22 ms 287.79 ms 289.35 ms]
       thrpt:  [34.560 Kelem/s 34.747 Kelem/s 34.939 Kelem/s]
change:
       time:   [-1.9362% -1.0431% -0.1755] (p = 0.02 < 0.05)
       thrpt:  [+0.1758% +1.0541% +1.9744]
       Change within noise threshold.
transfer/1-conn/1-1b-resp (aka. HPS): No change in performance detected.
       time:   [38.681 ms 38.828 ms 38.997 ms]
       thrpt:  [25.643   B/s 25.754   B/s 25.852   B/s]
change:
       time:   [-0.6048% +0.0244% +0.5989] (p = 0.94 > 0.05)
       thrpt:  [-0.5954% -0.0244% +0.6085]
       No change in performance detected.
Found 6 outliers among 100 measurements (6.00%)
6 (6.00%) high severe
transfer/1-conn/1-100mb-req (aka. Upload): Change within noise threshold.
       time:   [213.28 ms 213.64 ms 213.99 ms]
       thrpt:  [467.32 MiB/s 468.08 MiB/s 468.86 MiB/s]
change:
       time:   [+0.7063% +0.9453% +1.1777] (p = 0.00 < 0.05)
       thrpt:  [-1.1640% -0.9364% -0.7014]
       Change within noise threshold.
streams/walltime/1-streams/each-1000-bytes: No change in performance detected.
       time:   [588.05 µs 590.65 µs 593.65 µs]
       change: [-0.6882% -0.0395% +0.6462] (p = 0.91 > 0.05)
       No change in performance detected.
Found 11 outliers among 100 measurements (11.00%)
11 (11.00%) high severe
streams/walltime/1000-streams/each-1-bytes: Change within noise threshold.
       time:   [12.357 ms 12.384 ms 12.416 ms]
       change: [+0.5378% +0.8241% +1.1448] (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
streams/walltime/1000-streams/each-1000-bytes: 💔 Performance has regressed by +1.3111%.
       time:   [45.146 ms 45.191 ms 45.237 ms]
       change: [+1.0108% +1.3111% +1.5450] (p = 0.00 < 0.05)
       Performance has regressed.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
transfer/walltime/pacing-false/varying-seeds: Change within noise threshold.
       time:   [23.099 ms 23.129 ms 23.176 ms]
       change: [-1.7939% -1.6112% -1.3952] (p = 0.00 < 0.05)
       Change within noise threshold.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high severe
transfer/walltime/pacing-true/varying-seeds: Change within noise threshold.
       time:   [23.492 ms 23.512 ms 23.532 ms]
       change: [+0.0106% +0.1300% +0.2503] (p = 0.03 < 0.05)
       Change within noise threshold.
Found 3 outliers among 100 measurements (3.00%)
3 (3.00%) high mild
transfer/walltime/pacing-false/same-seed: Change within noise threshold.
       time:   [23.562 ms 23.583 ms 23.606 ms]
       change: [-0.9367% -0.8229% -0.7073] (p = 0.00 < 0.05)
       Change within noise threshold.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high severe
transfer/walltime/pacing-true/same-seed: No change in performance detected.
       time:   [23.859 ms 23.883 ms 23.911 ms]
       change: [-0.1826% -0.0170% +0.1460] (p = 0.84 > 0.05)
       No change in performance detected.
Found 6 outliers among 100 measurements (6.00%)
1 (1.00%) low mild
4 (4.00%) high mild
1 (1.00%) high severe

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

@github-actions
Copy link
Copy Markdown
Contributor

Client/server transfer results

Performance differences relative to 0626e18.

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-msquic-cubic 150.7 ± 4.9 143.7 173.1 212.3 ± 6.5 💚 -3.4 -2.2%
neqo-neqo-cubic 90.7 ± 2.5 86.7 97.5 352.7 ± 12.8 💔 0.8 0.9%
neqo-neqo-newreno 90.6 ± 2.6 86.5 98.8 353.1 ± 12.3 💔 0.7 0.8%

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 455.0 ± 1.8 450.5 462.3 70.3 ± 17.8
google-neqo-cubic 266.8 ± 2.6 261.8 279.1 120.0 ± 12.3 -0.0 -0.0%
msquic-msquic-nopacing 132.7 ± 38.4 111.1 356.7 241.2 ± 0.8
msquic-neqo-cubic 163.9 ± 44.8 122.9 356.5 195.3 ± 0.7 5.5 3.5%
neqo-google-cubic 768.0 ± 2.3 762.8 775.0 41.7 ± 13.9 0.2 0.0%
neqo-msquic-cubic 150.7 ± 4.9 143.7 173.1 212.3 ± 6.5 💚 -3.4 -2.2%
neqo-neqo-cubic 90.7 ± 2.5 86.7 97.5 352.7 ± 12.8 💔 0.8 0.9%
neqo-neqo-cubic-nopacing 89.4 ± 2.6 85.7 96.4 358.0 ± 12.3 0.1 0.1%
neqo-neqo-newreno 90.6 ± 2.6 86.5 98.8 353.1 ± 12.3 💔 0.7 0.8%
neqo-neqo-newreno-nopacing 90.5 ± 2.9 84.6 99.2 353.5 ± 11.0 0.5 0.6%
neqo-quiche-cubic 190.0 ± 3.6 185.3 213.8 168.4 ± 8.9 0.5 0.3%
neqo-s2n-cubic 215.8 ± 2.0 209.9 221.1 148.3 ± 16.0 0.2 0.1%
quiche-neqo-cubic 170.7 ± 2.9 165.1 179.4 187.4 ± 11.0 -0.7 -0.4%
quiche-quiche-nopacing 138.9 ± 2.8 133.5 151.3 230.3 ± 11.4
s2n-neqo-cubic 213.5 ± 3.1 207.3 224.1 149.9 ± 10.3 -0.6 -0.3%
s2n-s2n-nopacing 292.7 ± 25.5 276.0 388.1 109.3 ± 1.3

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

@jesup jesup force-pushed the users/jesup/exportkey branch 7 times, most recently from b76faba to aeb6595 Compare April 29, 2026 19:17
@github-actions
Copy link
Copy Markdown
Contributor

Failed Interop Tests

None ❓

All results

Succeeded Interop Tests

QUIC Interop Runner, client vs. server

neqo-pr as client

None ❓

neqo-pr as server

None ❓

Unsupported Interop Tests

QUIC Interop Runner, client vs. server

neqo-pr as client

None ❓

neqo-pr as server

None ❓

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

Labels

needs-rebase PR needs rebasing before it can be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants