Skip to content

Expose max locally-initiated concurrent_streams - #2784

Open
hackermondev wants to merge 2 commits into
quinn-rs:mainfrom
hackermondev:daniel/expose-max-local-streams
Open

Expose max locally-initiated concurrent_streams#2784
hackermondev wants to merge 2 commits into
quinn-rs:mainfrom
hackermondev:daniel/expose-max-local-streams

Conversation

@hackermondev

Copy link
Copy Markdown

This PR adds 2 function to quinn::Connection that expose the maximum number of locally-initiated concurrent streams.

Right now, when this limit is reached Quinn automatically stalls requests to open new streams. In a high-concurrency environment, this can affect performance. By exposing this limit, clients can track their stream count and have the option of starting a new Quinn connection when they reach the limit.

@Ralith

Ralith commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

the option of starting a new Quinn connection when they reach the limit.

Using multiple connections between two peers is, at least in principle, inefficient. This sounds like you're trying to work around an intentional concurrency limit imposed by the peer. If you need more than they advertise, why not ask them to adjust their configuration?

@hackermondev

Copy link
Copy Markdown
Author

why not ask them to adjust their configuration?

For my use case, thats not really an option.

Cloudflare imposes a limit of 100 streams on their http/3 QUIC connections (and http2). This limit is a default hard limit and is not configurable by the site owner. My backend needs to concurrently open many ongoing HTTP requests to origins that may be under Cloudflare and the only way to do that would be to open multiple QUIC connections.

It might be a little inefficient, but its only option.

@Ralith Ralith left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think you'd be better off working with your upstream (incl. Cloudflare) to relax this constraint, but exposing the information seems harmless.

@djc

djc commented Aug 19, 2026

Copy link
Copy Markdown
Member

Would you mind squashing these commits?

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.

3 participants