Repository navigation
Conversation
Motivation: A pending application pull can deliver a request after the peer reduced stream capacity. Modification: Hold at most one pulled request and resume it after a successful SETTINGS acknowledgement or when a stream slot opens. Preserve ACK ordering for newly unblocked DATA. Cancel an unsent streamed entity if the connection closes. Result: The client waits for capacity, keeps existing backpressure and shutdown semantics, and releases the unsent body on close. The acknowledgement order from apache#1594 is preserved. References: RFC 9113 Sections 5.1.2, 6.5.2, and 6.5.3; Apache Pekko HTTP apache#1592, apache#1594, and apache#1611.
He-Pin
force-pushed
the
fix/http2-park-client-request-until-stream-capacity
branch
from
November 26, 2026 20:25
1b0b6a4 to
e4c56bd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
A client can already have requested the next application request when a peer lowers its HTTP/2 stream concurrency limit. Starting that request after acknowledging the new limit can exceed the capacity the peer allows.
Modification
Recheck capacity at admission and hold at most one already-pulled request. Resume it after the relevant SETTINGS acknowledgement or when a stream slot becomes available. If the connection closes before the request can start, cancel its streamed request body. Preserve the existing backpressure and completion timeout, and document those semantics.
Result
Requests start only when current peer capacity allows. The pending request body is cleaned up if it cannot be sent. The public HTTP/2 builder tests cover both resumption and cleanup.
Tests
References