[release/7.0-staging] Send connection WINDOW_UPDATE before RTT PING #98384
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.
Backport of #97881 to release/7.0-staging
Fixes #97131
Customer Impact
Problem: gRPC server-streaming connections may be closed by server when communicating with service on GCP behind Google Cloud L7 External Load Balancer. It depends on size and frequency of gRPC messages.
Reported by customers in grpc/grpc-dotnet#2361 and grpc/grpc-dotnet#2358
gRPC is built on top of HTTP/2 protocol. In 'HttpClient' we use PING frames to measure RTT (Round-Trip Time) to leverage connections efficiently. Our usage of PING frames triggers DoS protection in Google Cloud L7 External Load Balancer and they close the connection from the server side. They are unwilling to change their implementation.
We worked with them to design ordering of frames mixed with WINDOW_UPDATE frames in a way that will avoid triggering their DoS protection and will allow us to measure RTT.
Regression
No. The behavior is specific to Google Cloud L7 External Load Balancer.
Testing
Risk
Low-Medium
We are now sending higher volume of
WINDOW_UPDATE
frames. In theory, some servers might have problem with that. Mitigations:System.Net.SocketsHttpHandler.Http2FlowControl.DisableDynamicWindowSizing
WINDOW_UPDATE
frames.