Support configuring http2_max_pending_accept_reset_streams

Open Beginner friendly
#657 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
Half a day
Newbie friendliness
75/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
rust
Domain
api, backend

Research direction

Start at the gRPC server builder's existing HTTP/2 configuration methods and the Http2Config definition. Trace the configuration into the Hyper server setup, then verify that the new option is forwarded and that the default behavior remains unchanged.

Written by the indexing model from the issue text.

Description

Background

The underlying hyper/h2 implementation already supports configuring
http2_max_pending_accept_reset_streams, but this option is currently not
exposed by Volo's gRPC server.

In our production environment, we frequently observe the following warning:

recv_reset; remotely-reset pending-accept streams reached limit (20)

Representative logs:

{"timestamp":"2026-07-15T10:13:08.670091417+08:00","level":"WARN","fields":{"message":"recv_reset; remotely-reset pending-accept streams reached limit (20)"},"target":"h2::proto::streams::recv"}

{"timestamp":"2026-07-15T10:13:08.682643952+08:00","level":"WARN","fields":{"message":"recv_reset; remotely-reset pending-accept streams reached limit (20)"},"target":"h2::proto::streams::recv"}

{"timestamp":"2026-07-15T10:13:08.758969319+08:00","level":"WARN","fields":{"message":"recv_reset; remotely-reset pending-accept streams reached limit (20)"},"target":"h2::proto::streams::recv"}

These warnings are repeatedly emitted under load, indicating that the default
limit (20) is insufficient for some workloads.

Reference

Hyper exposes this configuration because of the discussion in:

https://github.com/hyperium/hyper/issues/2877

Proposed API

Expose the configuration through the gRPC server builder, similar to the
existing HTTP/2 configuration methods.

pub fn http2_max_pending_accept_reset_streams(
    mut self,
    max: impl Into<Option<usize>>,
) -> Self {
    self.http2_config.max_pending_accept_reset_streams = max.into();
    self
}

Store the value in Http2Config:

pub(crate) max_pending_accept_reset_streams: Option<usize>,

with the default value:

max_pending_accept_reset_streams: None,

Finally, propagate the configuration into Hyper:

server
    .http2()
    // ...
    .max_pending_accept_reset_streams(
        self.http2_config.max_pending_accept_reset_streams,
    );
Benefits
  • Allows applications to tune the limit for workloads with frequent HTTP/2 stream resets.
  • Keeps the current behavior unchanged by default.
  • Aligns Volo with the underlying Hyper API.
  • The implementation is straightforward and fully backward compatible.
Dominant language
Rust
Stars
2.6k
Forks
223
Avg merge
18m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudwego/volo

All issues in cloudwego/volo

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.