Skip to content

Conversation

@benjaminpetit
Copy link
Member

Fixes #2070

@MihaZupan MihaZupan added this to the YARP 2.x milestone May 2, 2023
@benjaminpetit benjaminpetit merged commit 6736e0a into dotnet:main May 2, 2023
@benjaminpetit benjaminpetit deleted the fix/extended-connect-main branch May 2, 2023 17:13
Tratcher added a commit that referenced this pull request Jun 22, 2023
Passive health checks rely on the HttpForwarder to categorize failures so the check can understand if it was caused by the client, destination, or some other reason. Incorrect attribution can allow the client to induce an error and cause the destination to be marked unhealthy.

Scenarios:
1. Blame the request body (client/destination) for timeouts. Today if the ActivityTimeout triggers while uploading the request body that will be reported as RequestTimeout and blamed on the destination. However, if the proxy was waiting for the client to send more data, that should be blamed on the client instead (RequestBodyClient).
2. A malicious client may pretend to be a gRPC request by setting the expected Content-Type, but then getting proxied to a HTTP/1.1 destination. This causes the proxy request data rate and size limit to be disabled, but then you can induce an error against the destination's size limit that would be blamed on the destination. Fix: Delay disabling the limits until we're sure we were assigned to an HTTP/2 connection.
3. I've included #2119. This works around a Kestrel bug which caused a body length exception that we blamed on the destination. This fix is already in main.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Random 502 errors when client cancels request

3 participants