Skip to content

Support WebTransport anticipatedStreams#3473

Open
jesup wants to merge 1 commit into
users/jesup/avoid_PMTUDfrom
users/jesup/anticipated_streams
Open

Support WebTransport anticipatedStreams#3473
jesup wants to merge 1 commit into
users/jesup/avoid_PMTUDfrom
users/jesup/anticipated_streams

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:52
@jesup jesup changed the title Users/jesup/anticipated streams Support WebTransport anticipatedStreams Mar 16, 2026
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

This PR adds a WebTransport-facing API to declare anticipated incoming stream concurrency per session and plumbs that through to QUIC MAX_STREAMS updates so the peer can open more streams than the handshake baseline.

Changes:

  • Add transport-layer setters to update advertised remote stream limits (uni/bidi) via MAX_STREAMS.
  • Track per-session anticipated uni/bidi incoming counts and sum them across sessions to drive connection-level stream limits.
  • Add WebTransport tests validating when MAX_STREAMS frames are (and are not) sent.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
neqo-transport/src/streams.rs Adds setters to update remote stream limits for uni/bidi streams.
neqo-transport/src/fc.rs Documents intended set_max_active behavior related to monotonic limit updates.
neqo-transport/src/connection/params.rs Updates docs for baseline stream limits and how they can be increased post-handshake.
neqo-transport/src/connection/mod.rs Exposes connection-level setters for remote max streams (uni/bidi).
neqo-http3/src/features/extended_connect/tests/webtransport/mod.rs Wires in the new anticipated-streams test module.
neqo-http3/src/features/extended_connect/tests/webtransport/anticipated_streams.rs New tests for anticipated stream APIs and MAX_STREAMS transmission behavior.
neqo-http3/src/features/extended_connect/session.rs Stores per-session anticipated incoming uni/bidi counts with accessors.
neqo-http3/src/connection_client.rs Adds public Http3Client API methods to set anticipated incoming stream counts.
neqo-http3/src/connection.rs Implements the handlers that store anticipated values and sum across sessions to update transport limits.

Comment thread neqo-transport/src/streams.rs Outdated
Comment thread neqo-transport/src/fc.rs
Comment thread neqo-http3/src/connection.rs Outdated
Comment thread neqo-http3/src/connection.rs Outdated
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 am missing context. What is the goal of this feature? What does it enable applications to do?

Note that, in case we ever run multiple sessions and HTTP/3 requests on the same connection, a single session could choose the global limit, by setting its session limit, which propagates to a global limit.

Copy link
Copy Markdown
Member

@martinthomson martinthomson left a comment

Choose a reason for hiding this comment

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

This change is not what I would have expected from this one. The goal of this is to ensure that the flow control allocation for streams is generous enough that the server can make streams without getting blocked. To that end, this should route the message through to the max_active value on the relevant ReceiverFlowControl instance.

There is also the potential for this input to be fed to ConnectionParameters::max_streams() if the connection has not been created yet. That is a matter for the neqo glue code in Firefox.

In terms of spelling, this can use a better name than the one in the WT spec. set_active_streams or increase_max_active_streams...

@jesup
Copy link
Copy Markdown
Member Author

jesup commented May 1, 2026

@jesup
Copy link
Copy Markdown
Member Author

jesup commented May 1, 2026

Perhaps this is closer to what you expected

@codecov
Copy link
Copy Markdown

codecov Bot commented May 23, 2026

Codecov Report

❌ Patch coverage is 98.05825% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.42%. Comparing base (e61549c) to head (406be9c).

Additional details and impacted files
@@                     Coverage Diff                     @@
##           users/jesup/avoid_PMTUD    #3473      +/-   ##
===========================================================
+ Coverage                    94.38%   94.42%   +0.03%     
===========================================================
  Files                          118      118              
  Lines                        39911    40014     +103     
  Branches                     39911    40014     +103     
===========================================================
+ Hits                         37671    37783     +112     
+ Misses                        1501     1491      -10     
- Partials                       739      740       +1     
Flag Coverage Δ
freebsd 93.59% <98.05%> (+<0.01%) ⬆️
linux 94.53% <98.05%> (+<0.01%) ⬆️
macos 94.50% <98.05%> (+0.04%) ⬆️
windows 94.53% <98.05%> (+<0.01%) ⬆️

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

Components Coverage Δ
neqo-common 98.57% <ø> (ø)
neqo-http3 92.39% <97.70%> (+0.03%) ⬆️
neqo-qpack 95.62% <ø> (ø)
neqo-transport 95.67% <100.00%> (+0.06%) ⬆️
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.

@jesup jesup force-pushed the users/jesup/avoid_PMTUD branch from bf42e35 to dc0bb12 Compare May 23, 2026 12:31
@jesup jesup force-pushed the users/jesup/anticipated_streams branch from c857318 to 3907c3a Compare May 23, 2026 12:31
@jesup jesup force-pushed the users/jesup/avoid_PMTUD branch from dc0bb12 to 67055f7 Compare May 23, 2026 13:15
@jesup jesup force-pushed the users/jesup/anticipated_streams branch from 3907c3a to da96451 Compare May 23, 2026 13:15
@jesup jesup force-pushed the users/jesup/avoid_PMTUD branch from 67055f7 to a025db5 Compare May 23, 2026 13:37
@jesup jesup force-pushed the users/jesup/anticipated_streams branch from da96451 to ba77b24 Compare May 23, 2026 13:37
Copy link
Copy Markdown
Member

@martinthomson martinthomson left a comment

Choose a reason for hiding this comment

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

I'm not sure about the logic here. If we are giving a session streams up to the limit they request, shouldn't we be policing their use of that stream limit?

And what about defaults? You are setting the default value to 0, which

Comment thread neqo-http3/src/connection.rs Outdated
Comment thread neqo-transport/src/connection/params.rs Outdated
Comment thread neqo-transport/src/fc.rs
Comment thread neqo-http3/src/connection.rs Outdated
Comment thread neqo-http3/src/connection.rs Outdated
@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/avoid_PMTUD branch from a025db5 to 1107cbc Compare May 27, 2026 18:27
@jesup jesup force-pushed the users/jesup/anticipated_streams branch from ba77b24 to 2f2d647 Compare May 27, 2026 18:27
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 27, 2026

Merging this PR will not alter performance

✅ 23 untouched benchmarks
🗄️ 1 archived benchmark run1


Comparing users/jesup/anticipated_streams (406be9c) with users/jesup/avoid_PMTUD (e61549c)

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 force-pushed the users/jesup/avoid_PMTUD branch from 5944692 to 02a84ce Compare May 30, 2026 05:42
@jesup jesup force-pushed the users/jesup/anticipated_streams branch from 5219430 to a510503 Compare May 30, 2026 05:42
@jesup jesup force-pushed the users/jesup/avoid_PMTUD branch from 02a84ce to 77287f4 Compare May 30, 2026 16:57
@jesup jesup force-pushed the users/jesup/anticipated_streams branch from a510503 to 41d0722 Compare May 30, 2026 16:57
@jesup jesup force-pushed the users/jesup/avoid_PMTUD branch from 77287f4 to fe4fae4 Compare June 2, 2026 13:24
@jesup jesup force-pushed the users/jesup/anticipated_streams branch from 41d0722 to 921ea46 Compare June 2, 2026 13:24
@jesup jesup dismissed martinthomson’s stale review June 3, 2026 14:16

As best I can tell all requests have been resolved; I'll re-request review

@jesup jesup requested a review from martinthomson June 3, 2026 14:17
@jesup jesup force-pushed the users/jesup/avoid_PMTUD branch from fe4fae4 to 480e253 Compare June 3, 2026 14:36
@jesup jesup force-pushed the users/jesup/anticipated_streams branch from 921ea46 to 67b7d62 Compare June 3, 2026 14:36
@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/avoid_PMTUD at 480e253.

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 ⚠️BA
neqo-pr vs. neqo: A
neqo-pr vs. nginx: BP BA
neqo-pr vs. ngtcp2: CM
neqo-pr vs. picoquic: A
neqo-pr vs. quic-go: A
neqo-pr vs. quic-zig: B
neqo-pr vs. quiche: BP BA
neqo-pr vs. s2n-quic: ⚠️BA CM
neqo-pr vs. tquic: S BP BA
neqo-pr vs. xquic: A
aioquic vs. neqo-pr: CM
go-x-net vs. neqo-pr: CM
kwik vs. neqo-pr: BP BA CM
lsquic vs. neqo-pr: ⚠️L1
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: CM
quinn vs. neqo-pr: 🚀L1 ⚠️C1 V2 CM
s2n-quic vs. neqo-pr: CM
tquic vs. neqo-pr: ⚠️L1 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

@jesup jesup force-pushed the users/jesup/avoid_PMTUD branch from 480e253 to 008832e Compare June 3, 2026 21:25
@jesup jesup force-pushed the users/jesup/anticipated_streams branch from 67b7d62 to ef16d86 Compare June 3, 2026 21:25
@jesup jesup force-pushed the users/jesup/avoid_PMTUD branch from 008832e to e61549c Compare June 4, 2026 14:36
@jesup jesup force-pushed the users/jesup/anticipated_streams branch from ef16d86 to 406be9c Compare June 4, 2026 14:36
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

Benchmark results

Significant performance differences relative to e61549c.

streams/walltime/1000-streams/each-1000-bytes: 💔 Performance has regressed by +1.9239%.
       time:   [40.376 ms 40.427 ms 40.478 ms]
       change: [+1.7540% +1.9239% +2.1042] (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 +2.4309%.
       time:   [34.562 ms 34.618 ms 34.675 ms]
       change: [+2.1993% +2.4309% +2.6550] (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/10-streams/each-1048576-bytes: 💔 Performance has regressed by +1.9914%.
       time:   [93.068 ms 93.448 ms 93.891 ms]
       change: [+1.2986% +1.9914% +2.6825] (p = 0.00 < 0.05)
       Performance has regressed.
Found 3 outliers among 100 measurements (3.00%)
1 (1.00%) low severe
2 (2.00%) high severe
All results
transfer/1-conn/1-100mb-resp (aka. Download): Change within noise threshold.
       time:   [166.61 ms 167.01 ms 167.42 ms]
       thrpt:  [597.29 MiB/s 598.78 MiB/s 600.19 MiB/s]
change:
       time:   [+0.1780% +0.5057% +0.8477] (p = 0.00 < 0.05)
       thrpt:  [-0.8405% -0.5031% -0.1777]
       Change within noise threshold.
Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) high mild
1 (1.00%) high severe
transfer/1-conn/10_000-parallel-1b-resp (aka. RPS): No change in performance detected.
       time:   [270.14 ms 272.03 ms 273.93 ms]
       thrpt:  [36.506 Kelem/s 36.760 Kelem/s 37.018 Kelem/s]
change:
       time:   [-1.3979% -0.5005% +0.4858] (p = 0.31 > 0.05)
       thrpt:  [-0.4835% +0.5030% +1.4177]
       No change in performance detected.
Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) low mild
1 (1.00%) high mild
transfer/1-conn/1-1b-resp (aka. HPS): No change in performance detected.
       time:   [38.504 ms 38.686 ms 38.889 ms]
       thrpt:  [25.714   B/s 25.849   B/s 25.972   B/s]
change:
       time:   [-0.5118% +0.1277% +0.8180] (p = 0.70 > 0.05)
       thrpt:  [-0.8114% -0.1275% +0.5144]
       No change in performance detected.
Found 8 outliers among 100 measurements (8.00%)
8 (8.00%) high severe
transfer/1-conn/1-100mb-req (aka. Upload): Change within noise threshold.
       time:   [169.32 ms 169.68 ms 170.11 ms]
       thrpt:  [587.86 MiB/s 589.33 MiB/s 590.58 MiB/s]
change:
       time:   [-1.3055% -1.0279% -0.7444] (p = 0.00 < 0.05)
       thrpt:  [+0.7500% +1.0386% +1.3228]
       Change within noise threshold.
Found 5 outliers among 100 measurements (5.00%)
3 (3.00%) low mild
2 (2.00%) high severe
streams/walltime/1-streams/each-1000-bytes: No change in performance detected.
       time:   [572.76 µs 575.02 µs 577.64 µs]
       change: [-0.5237% +0.0492% +0.7009] (p = 0.87 > 0.05)
       No change in performance detected.
Found 11 outliers among 100 measurements (11.00%)
2 (2.00%) high mild
9 (9.00%) high severe
streams/walltime/1000-streams/each-1-bytes: No change in performance detected.
       time:   [11.877 ms 11.908 ms 11.947 ms]
       change: [-0.2417% +0.0736% +0.4315] (p = 0.68 > 0.05)
       No change in performance detected.
Found 4 outliers among 100 measurements (4.00%)
3 (3.00%) high mild
1 (1.00%) high severe
streams/walltime/1000-streams/each-1000-bytes: 💔 Performance has regressed by +1.9239%.
       time:   [40.376 ms 40.427 ms 40.478 ms]
       change: [+1.7540% +1.9239% +2.1042] (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 +2.4309%.
       time:   [34.562 ms 34.618 ms 34.675 ms]
       change: [+2.1993% +2.4309% +2.6550] (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/10-streams/each-1048576-bytes: 💔 Performance has regressed by +1.9914%.
       time:   [93.068 ms 93.448 ms 93.891 ms]
       change: [+1.2986% +1.9914% +2.6825] (p = 0.00 < 0.05)
       Performance has regressed.
Found 3 outliers among 100 measurements (3.00%)
1 (1.00%) low severe
2 (2.00%) high severe
transfer/walltime/pacing-false/varying-seeds: Change within noise threshold.
       time:   [18.736 ms 18.761 ms 18.800 ms]
       change: [-1.2946% -1.0323% -0.7614] (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.205 ms 19.232 ms 19.275 ms]
       change: [-0.8722% -0.6203% -0.3578] (p = 0.00 < 0.05)
       Change within noise threshold.
Found 6 outliers among 100 measurements (6.00%)
5 (5.00%) high mild
1 (1.00%) high severe
transfer/walltime/pacing-false/same-seed: Change within noise threshold.
       time:   [18.876 ms 18.894 ms 18.917 ms]
       change: [-1.3876% -1.1824% -1.0060] (p = 0.00 < 0.05)
       Change within noise threshold.
Found 11 outliers among 100 measurements (11.00%)
5 (5.00%) low mild
3 (3.00%) high mild
3 (3.00%) high severe
transfer/walltime/pacing-true/same-seed: Change within noise threshold.
       time:   [19.442 ms 19.459 ms 19.479 ms]
       change: [+0.0392% +0.1772% +0.3137] (p = 0.01 < 0.05)
       Change within noise threshold.
Found 2 outliers among 100 measurements (2.00%)
1 (1.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

github-actions Bot commented Jun 4, 2026

Client/server transfer results

Performance differences relative to e61549c.

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-cubic 81.9 ± 3.8 75.8 109.2 390.7 ± 8.4 💔 1.5 1.9%
neqo-neqo-cubic-nopacing 79.8 ± 2.6 74.9 86.0 401.0 ± 12.3 💔 1.2 1.5%
neqo-neqo-newreno-nopacing 80.1 ± 3.0 73.8 87.1 399.6 ± 10.7 💔 0.8 1.0%

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 462.1 ± 2.5 455.0 475.0 69.2 ± 12.8
google-neqo-cubic 266.1 ± 2.3 261.5 275.4 120.3 ± 13.9 -0.7 -0.3%
msquic-msquic-nopacing 136.9 ± 43.7 110.4 326.9 233.7 ± 0.7
msquic-neqo-cubic 165.4 ± 42.7 114.3 382.9 193.5 ± 0.7 -1.8 -1.1%
neqo-google-cubic 766.3 ± 2.5 760.8 780.1 41.8 ± 12.8 0.2 0.0%
neqo-msquic-cubic 145.7 ± 1.6 141.5 151.6 219.6 ± 20.0 -0.5 -0.3%
neqo-neqo-cubic 81.9 ± 3.8 75.8 109.2 390.7 ± 8.4 💔 1.5 1.9%
neqo-neqo-cubic-nopacing 79.8 ± 2.6 74.9 86.0 401.0 ± 12.3 💔 1.2 1.5%
neqo-neqo-newreno 81.0 ± 2.9 75.4 87.4 395.1 ± 11.0 0.2 0.3%
neqo-neqo-newreno-nopacing 80.1 ± 3.0 73.8 87.1 399.6 ± 10.7 💔 0.8 1.0%
neqo-quiche-cubic 191.2 ± 2.6 186.8 196.3 167.4 ± 12.3 0.1 0.0%
neqo-s2n-cubic 215.3 ± 2.1 210.0 229.8 148.7 ± 15.2 -0.0 -0.0%
quiche-neqo-cubic 183.1 ± 2.9 177.8 194.5 174.7 ± 11.0 -0.5 -0.3%
quiche-quiche-nopacing 137.6 ± 2.9 132.8 149.2 232.6 ± 11.0
s2n-neqo-cubic 216.5 ± 4.1 207.1 225.5 147.8 ± 7.8 -0.3 -0.2%
s2n-s2n-nopacing 294.3 ± 29.6 278.4 414.1 108.7 ± 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