Update connection window size, before any stream specific handling#12910
Open
yknoya wants to merge 1 commit intoapache:9.2.xfrom
Open
Update connection window size, before any stream specific handling#12910yknoya wants to merge 1 commit intoapache:9.2.xfrom
yknoya wants to merge 1 commit intoapache:9.2.xfrom
Conversation
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.
Issue
In ATS 9.2.x, we observed an increase in 408/504 (timeout) responses for HTTP/2 POST requests.
Although simplified, the issue occurs when all of the following conditions are met:
This issue was resolved when the HTTP/2 to origin feature was implemented.
Therefore, it reproduces on the 9.2.x branch, but not on the following branches:
Root Cause
In conclusion, the issue is caused by a mismatch in the connection-level window size between the client and ATS.
The client's tracked window size reaches 0, while ATS internally maintains a value greater than 0.
More specifically, when handling multiple POST requests, the timeout occurs through the following sequence:
Although the stream has already been closed, the root cause is that ATS does not decrement the connection-level window size when it receives a DATA frame for a closed stream.
Fix
In the 10.1.x branch, the timing of the connection-level window size decrement was moved earlier in the processing flow.
The same change has been applied to the 9.2.x branch.
trafficserver/src/proxy/http2/Http2ConnectionState.cc
Lines 104 to 111 in 6d36bdb