emissary
emissary copied to clipboard
Ambassador does not work well for gRPC streaming
Describe the bug gRPC streams are somewhat different from traditional unary API calls. Often there may be long idle periods. gRPC and Envoy have sophisticated logic for managing gRPC timeout without conflicting with the timeouts for "normal" unary requests (gRPC or not). Specifically, I am talking about the "grpc-timeout" client header, "max_grpc_timeout" route property (if not set, the header mentioned before is not taken into account) and "grpc_timeout_offset" route property. Ambassador only offers "timeout_ms" which is translated into Envoy's "timeout" route property. This means that no special handling for gRPC streams is possible.
As result, the only way to support the streams correctly is to disable the timeout, which may not be a good idea in general. Plus, this simply does not provide enough flexibility.
To Reproduce Steps to reproduce the behavior:
- Start gRPC stream
- Let it idle for more than 3s
- The stream will be closed by Ambassador
Expected behavior If Ambassador provided more configuration properties, it could be supported in much more elegant way.
Versions (please complete the following information):
- Ambassador: [master]
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
can it be reopened?
i am seing gRPC Error (14, upstream connect error or disconnect/reset before headers. reset reason: connection failure)
for dart clients while go clients just work fine
I'd also like to bump this issue, would there be a way to set a stream_idle_timeout
? https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/core/v3/protocol.proto#envoy-v3-api-field-config-core-v3-httpprotocoloptions-idle-timeout
Thanks for this issue. If you're available to discuss or help with implementation please join our Emissary Contributors Meeting .
Is there any known workaround for this limitation? There are numerous threads online (example) backing up that Envoy's stream_idle_timeout
needs to be configured/disabled for gRPC workflows. I have not yet found a way to do so via Ambassador.