tonic: add hyper's http2_max_pending_accept_reset_streams
to server
#1401
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds the
http2_max_pending_accept_reset_streams
property to the server, to configure the allowed number of reset streams pending accept.Motivation
In Qdrant we're trying to use hundreds of streams over HTTP2, all having a good chance to be dropped/reset. This makes it very easy to reach the default limit of 20 reset streams, causing internal connection errors, causing cluster consensus problems in production.
We'd like to greatly increase this limit for our internal cluster communication to prevent triggering the
GOAWAY/ENHANCE_YOUR_CALM
error. The risk of a denial of service is accepted because this is just for internal communication. The additional CPU/memory this consumes is not an issue in our case.Solution
To increase this limit, we need access to the property this PR implements.
For reference, this limit was implemented a month ago in hyperium/h2#668.
Additionally we'd like to access
reset_stream_duration
to further tune this. But that will be in a different PR once this is merged.