Skip to content

Hard-enforce max_active_streams_in at HTTP/2 stream creation#13388

Merged
ezelkow1 merged 1 commit into
apache:9.2.xfrom
maskit:h2-zero-window-cap-9_2
Jul 15, 2026
Merged

Hard-enforce max_active_streams_in at HTTP/2 stream creation#13388
ezelkow1 merged 1 commit into
apache:9.2.xfrom
maskit:h2-zero-window-cap-9_2

Conversation

@maskit

@maskit maskit commented Jul 15, 2026

Copy link
Copy Markdown
Member

proxy.config.http2.max_active_streams_in previously only adjusted the advertised SETTINGS_MAX_CONCURRENT_STREAMS, leaving the proxy unable to bound buffered response memory against clients that open streams faster than the advisory throttle reacts. It now also carries a finite default so the cap is no longer effectively unlimited.

The new knob proxy.config.http2.max_active_streams_policy_in selects enforcement. Value 0 keeps the advisory behavior that lowers advertised concurrency to min_concurrent_streams_in. Value 1 refuses new inbound streams with REFUSED_STREAM once the process-wide active-stream count reaches the limit and leaves the advertised value untouched. Refusal happens after HPACK decoding so the dynamic table stays in sync and the connection survives; max_active_streams_exceeded_in counts each refusal.

max_active_streams_in now defaults to 200000 rather than 0.

(cherry picked from commit c76a7c81220fca009ff4dc7de91647c3cf6d72d7)

proxy.config.http2.max_active_streams_in previously only adjusted the
advertised SETTINGS_MAX_CONCURRENT_STREAMS, leaving the proxy unable to
bound buffered response memory against clients that open streams faster
than the advisory throttle reacts. It now also carries a finite default
so the cap is no longer effectively unlimited.

The new knob proxy.config.http2.max_active_streams_policy_in selects
enforcement. Value 0 keeps the advisory behavior that lowers advertised
concurrency to min_concurrent_streams_in. Value 1 refuses new inbound
streams with REFUSED_STREAM once the process-wide active-stream count
reaches the limit and leaves the advertised value untouched. Refusal
happens after HPACK decoding so the dynamic table stays in sync and the
connection survives; max_active_streams_exceeded_in counts each refusal.

max_active_streams_in now defaults to 200000 rather than 0.

(cherry picked from commit c76a7c81220fca009ff4dc7de91647c3cf6d72d7)
@maskit maskit self-assigned this Jul 15, 2026
@maskit maskit added the HTTP/2 label Jul 15, 2026
@ezelkow1

Copy link
Copy Markdown
Member

[approve ci]

@ezelkow1 ezelkow1 merged commit 311f037 into apache:9.2.x Jul 15, 2026
15 checks passed
@ezelkow1 ezelkow1 added this to the 9.2.14 milestone Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants