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

Gracefully handle short lived outages by holding RPC calls #1403

Merged
merged 2 commits into from
Jul 12, 2016
Merged

Conversation

armon
Copy link
Member

@armon armon commented Jul 10, 2016

This PR modifies the RPC forwarding behavior from a fast-fail in the case there is no known leader, to adding a small hold period. In the case of a short lived outage, this will cause RPCs to return successfully. In the case of a long lived outage, the call will still error out in a reasonable time. It also prevents callers who have while-true retry logic from abusing the system.

cc: @dadgar @sean-

// so that the caller experiences a slow response rather than an error.
// This period is meant to be long enough for a leader election to take
// place, and a small jitter is applied to avoid a thundering herd.
RPCHoldTimeout time.Duration
Copy link
Contributor

@diptanu diptanu Jul 10, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@armon Don't we want this to be configurable using the server config? We will have to add the key in ServerConfig if we want operators to be able to modify the value.

@dadgar
Copy link
Contributor

dadgar commented Jul 12, 2016

LGTM

@dadgar dadgar merged commit 3f511eb into master Jul 12, 2016
@dadgar dadgar deleted the f-hold-rpc branch July 12, 2016 19:52
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants