-
Notifications
You must be signed in to change notification settings - Fork 690
Description
Is your feature request related to a problem? Please describe.
A gRPC channel has observable connection states: CONNECTING, READY, TRANSIENT_FAILURE, IDLE, and SHUTDOWN (as per https://grpc.github.io/grpc/core/md_doc_connectivity-semantics-and-api.html). Specifically, the channel's transition from READY to IDLE is governed by the "idle timeout" value of the channel. There's a couple of pieces of documentation from gRPC core that talk about this idle timeout parameter:
- https://grpc.github.io/grpc/core/md_doc_connectivity-semantics-and-api.html stating the default value is 5 minutes
- https://grpc.github.io/grpc/core/group__grpc__arg__keys.html#ga51ab062269cd81298f5adb6fd9a45e99 stating the default value is 30 minutes
We use these low-level transitions to perform specific logic on our domain's connections, and would like to test this specific transition from READY to IDLE (but don't want a test that runs for 5 or 30 minutes).
Describe the solution you'd like
We'd like a publicly-exposed means of adjusting the value of the channel's idle timeout (e.g. a ChannelOptions parameter when initialising the channel).
Describe alternatives you've considered
We've taken a look in the ClientOptions and ChannelOptions in grpc-js, but have had no luck in finding anything that would resolve this problem.
Although, there are the options of keepalive_time_ms and keepalive_timeout_ms. Would it be possible to use these to augment this functionality? Or any other further options that might be useful here?
Additional context
- discussion post here https://groups.google.com/g/grpc-io/c/yq4pmBGaXOQ
- relevant domain-specific issue for our usecase Verify GRPC channel connectivity state
READYtoIDLEtransition MatrixAI/Polykey#332