Skip to content
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

Support for setting default timeout in GRPC clients #9110

Closed
mightyguava opened this issue Dec 14, 2016 · 12 comments
Closed

Support for setting default timeout in GRPC clients #9110

mightyguava opened this issue Dec 14, 2016 · 12 comments

Comments

@mightyguava
Copy link

mightyguava commented Dec 14, 2016

It would be nice if there was consistent default timeout support (be able to set a default timeout) across the GRPC clients. Default timeouts are really useful and part of basically every networking-related library. One advantage in a production scenario would be not having to worry about people forgetting to set timeouts on individual requests and saturating client resources when the server's slow to respond or not responding.

It seems like support for default timeouts in GRPC is currently implementation-dependent, and supported in only the Ruby library and Go library?

I found a couple issues that indicate interest in having default timeouts across languages:
grpc/grpc-haskell#4
#2114
grpc/grpc-java#1495

Maybe it would be nice to build the functionality into core and expose it into the individual languages?

@murgatroid99
Copy link
Member

That Ruby documentation link corresponds to a really old version of the library, and Ruby is currently consistent with other languages in having no finite timeout.

@mightyguava
Copy link
Author

It looks like the ability to set a default timeout on a client stub is still available: https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/generic/client_stub.rb#L109

I think my original comment may have been confusing. I was not hoping that GRPC would have a default timeout. I was hoping that it would be possible for users to specify a default timeout either on the channel or on the client, in a consistent manner across languages. Edited the original comment

@mightyguava mightyguava changed the title Default timeout for GRPC clients Support for setting default timeout in GRPC clients Dec 14, 2016
@markdroth
Copy link
Member

The forthcoming service config functionality (which we plan to make available by the end of Q1) will provide a way for service owners to publish default timeouts on a per-method basis (including setting a default for all methods of a given service). That's not exactly the same thing as allowing the client to specify a default timeout for all RPCs, but I think it's actually a bit better suited to real-life use, since it's hard to imagine the same default timeout being appropriate for every single RPC.

@kraghu
Copy link

kraghu commented Aug 2, 2017

@markdroth How do we add timeouts in android grpc ?

@stale
Copy link

stale bot commented Sep 5, 2019

This issue/PR has been automatically marked as stale because it has not had any update (including commits, comments, labels, milestones, etc) for 180 days. It will be closed automatically if no further update occurs in 1 day. Thank you for your contributions!

@markdroth
Copy link
Member

Keeping this open, since we still haven't enabled service config functionality by default in OSS.

@stale stale bot removed the disposition/stale label Sep 5, 2019
@HunterLarco
Copy link

Is there a current roadmap for this feature?

@markdroth
Copy link
Member

We need to finish the service config error handling work and then enable the TXT lookups by default. Hopefully, we'll be able to do this over the next couple of quarters.

@stale
Copy link

stale bot commented Apr 22, 2020

This issue/PR has been automatically marked as stale because it has not had any update (including commits, comments, labels, milestones, etc) for 180 days. It will be closed automatically if no further update occurs in 1 day. Thank you for your contributions!

@hcoona
Copy link

hcoona commented Apr 27, 2020

We are still wanting this feature, so keep it open now.

@stale stale bot removed the disposition/stale label Apr 27, 2020
@stale
Copy link

stale bot commented Jul 26, 2020

This issue/PR has been automatically marked as stale because it has not had any update (including commits, comments, labels, milestones, etc) for 30 days. It will be closed automatically if no further update occurs in 7 day. Thank you for your contributions!

@stale stale bot closed this as completed Aug 2, 2020
@nocive
Copy link

nocive commented Mar 31, 2021

bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants