Skip to content

H2: refuse new streams before an RST_STREAM flood limit instead of closing the connection #1797

Closed

Description

@FlorentinDUBOIS

When an HTTP/2 connection crosses an RST_STREAM flood limit (h2_max_rst_stream_per_window, or the floor of h2_max_rst_stream_abusive_lifetime), Sōzu sends GOAWAY(ENHANCE_YOUR_CALM) and closes the connection. Every stream in flight on it is lost, including requests that were being served normally. Clients that cancel many requests, such as gRPC clients with short deadlines, lose whole connections even though most of their traffic is legitimate.

Proposal: add a soft threshold below these two limits. Past it, refuse new client streams with RST_STREAM(REFUSED_STREAM), which RFC 9113 §8.7 makes safe to retry, and keep serving the streams already open. Accept new streams again once the counters fall back below the threshold. The limits themselves still send GOAWAY(ENHANCE_YOUR_CALM), unchanged. A refusal must not feed the flood counters, and the threshold should be configurable, with a way to disable it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions