-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Port to 1.11.x: Add timeout to Client RPC calls (#11500) #14498
Conversation
Adds a timeout (deadline) to client RPC calls, so that streams will no longer hang indefinitely in unstable network conditions. Co-authored-by: kisunji <ckim@hashicorp.com>
The timeout should include the maximum possible jitter since the server will randomly add to it's timeout a jitter. If the server's timeout is less than the client's timeout then the client will return an i/o deadline reached error. Before: ``` time curl 'http://localhost:8500/v1/catalog/service/service?dc=other-dc&stale=&wait=600s&index=15820644' rpc error making call: i/o deadline reached real 10m11.469s user 0m0.018s sys 0m0.023s ``` After: ``` time curl 'http://localhost:8500/v1/catalog/service/service?dc=other-dc&stale=&wait=600s&index=15820644' [...] real 10m35.835s user 0m0.021s sys 0m0.021s ```
@dhiaayachi , @kisunji : Should #13344 have also been included in this backport to 1.11? I know that's come up in the context of #11500 before. |
Oh yes, I think that may have been missed |
#13348 just backported to 1.12 as far as I can tell, not 1.11 |
@jkirschner-hashicorp @kisunji I'm not sure I understand the link between this (adding RPC timeout) and the fix introduced in #13344 |
@dhiaayachi There was an existing bug where KV.Get endpoint was being passed |
Thank you @kisunji, I get it now 🙂 |
Done: c42dde9 |
Description
Adds a timeout (deadline) to client RPC calls, so that streams will no longer hang indefinitely in unstable network conditions.
Co-authored-by: kisunji ckim@hashicorp.com
Testing & Reproduction steps
Links
Port of:
PR Checklist