Skip to content

Add max send buffer per stream option #580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 8, 2021
Merged

Conversation

seanmonstar
Copy link
Member

An alternative to #577.

This makes the max send buffer size per stream, instead of for the entire connection. It also does a lot less to try to enforce it, since the assigning of capacity is a complicated beast. All this does is clamp how high something like SendStream::capacity() will return. It's more just an advisory to the user of the SendStream.

Since hyper currently will only produce more data once the available capacity is over zero, it should behave well with this change. I've tried out this patch in the hyper HTTP/2 benchmarks, and see that they all still pass (don't hang). However, this is missing some unit tests in flow_control.rs...

@seanmonstar seanmonstar requested a review from nox December 6, 2021 23:18
@seanmonstar seanmonstar merged commit efa113b into master Dec 8, 2021
@seanmonstar seanmonstar deleted the max-stream-send-buffer branch December 8, 2021 18:03
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.

2 participants