-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
router: per data frame timeouts #1778
Comments
Yeah, we don't have a great solution here today. Really the only solution right now for streams is to disable timeouts on the route. So yes, I think given the current code this is what you have to do. Ultimately, I would like to create a different type of timeout which operates at the granularity of data frames. So you can say something like: "reset if we don't get any data within X milliseconds." This would be better for streaming. |
Thanks for your quick reply! |
I'm going to reopen this to track the feature request. |
@mattklein123 gRPC spec (https://tools.ietf.org/html/draft-kumar-rtgwg-grpc-protocol-00) defines a timeout header
Maybe |
@jrajahalme AFAICT from looking at that, that timeout value is also not sufficient for streaming APIs (if it is, it's not specified what the timeout actually means). I don't have any issue with potentially supporting gRPC timeouts via header if there is a specific timeout header, but I think we should also definitely allow data frame timeouts to be specified in config since we can't trust headers for edge traffic, operators might want to override, etc. If you are interested in implementing this please let me know. :) |
I'm experimenting with this. Currently looking at adding support for |
Not sure if gRPC client libraries set |
@jrajahalme SGTM to try that out. I would still also like to implement data frame timeouts, so if you can do that at the same time that would be awesome. |
If the request is a gRPC request, derive the request timeout from 'grpc-timeout' header (as specified in https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md) instead of the route configuration. This makes the timeout behavior of a proxy to comply with the expectation of the gRPC clients so that the timeout behavior with proxies is the same as between directly connected client and server. gRPC async client is modified to generate 'grpc-timeout' header when a timeout is specified. Fixes: envoyproxy#1778 Signed-off-by: Jarno Rajahalme <[email protected]>
Added support for |
I'll work on implementing this over the next week. |
Fixes envoyproxy#1778. Risk level: Low (opt in). Testing: Integration and unit tests added for various timeout scenarios. Signed-off-by: Harvey Tuch <[email protected]>
…he filter chain. (#3776) This is the complete HTTP/1.1 implementation of #3301, new style websockets. It should preserve existing behavior for "old style" websockets except for handling transfer-encoding requests (we all agree shouldn't happen) and responses (actually could happen and have been requested) better. Risk Level: High (should be self contained but still lots of core code changes) Testing: Thorough integration tests. unit tests for http1 codec Docs Changes: added websocket FAQ Release Notes: added Fixes #3301 (modulo timeouts not working, which will be addressed by #3654 or #1778) Signed-off-by: Alyssa Wilk <[email protected]>
Fixes #1778. Risk level: Medium. A very conservative 5 minute default idle timeout has been set, which should not affect most deployments with default timeout already kicking in for connection idle or upstream idle. This will however affect things like hanging POSTs. Testing: Integration and unit tests added for various timeout scenarios. Signed-off-by: Harvey Tuch <[email protected]>
* implement mixer forwarding Signed-off-by: Kuat Yessenov <[email protected]> * hmm Signed-off-by: Kuat Yessenov <[email protected]> * fix the bug Signed-off-by: Kuat Yessenov <[email protected]> * review Signed-off-by: Kuat Yessenov <[email protected]>
When using gRPC streams, the connection times out after the route's timeout_ms is hit. Is the proper solution to make a route for only my streaming endpoints and to set timeout_ms to 0? Seems very hacky to me and the docs don't mention much about handling gRPC streams.
The text was updated successfully, but these errors were encountered: