-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Add possibility to set connect timeout on ManagedChannelBuilder #11329
Comments
How are you setting it now? What value are you setting it to? What sort of environment are you running in? However you are doing it now, after Happy Eyeballs the connect timeout (what you want to configure) will probably change. A long time ago there was a goal to have a single timeout for all the parts of the connection establishment (TCP, TLS, HTTP/2). That proved incompatible with multiple other things. Now that we have sticky-TRANSIENT_FAILURE in pick_first and Happy Eyeballs is almost enabled, we may revisit that soon. But I don't know what configuration will be supported. |
For example for Netty I'm setting it with |
That is only a problem on a new channel, right? (Not to say it isn't a problem, but to confirm that I understand which problem.) Is there only a single server for the channel to connect to, or are there multiple (possibly) available backends?
FWIW, xds isn't its own channel type. In-process doesn't have a connect timeout (it fails instantly if server is not bound). OkHttp would be a quite different implementation, as it isn't using an API that can set a connect timeout today. |
Correct, only for a new channel. We have setups both with single servers, and multiple servers (one DNS name/multiple IPs).
Right, I was thinking of XdsServerBuilder which is it's own type. Would enabling (aggressive, 10 second) keep-alive solve this? Or is keep-alive only performed after initial connection? |
I ended up solving this with an interceptor. |
I package grpc-java in a library and give the user the possibility to select transport to include.
It would be nice if connect timeout can be set on ManagedChannelBuilder instead of having to be done in 5 dfferent ways for Netty/shaded Netty/OkHttp/xDs/InProcess.
I'd be happy to provide a PR but want to check that it would be a desired feature before I spend time on it. 😅
The text was updated successfully, but these errors were encountered: