-
Notifications
You must be signed in to change notification settings - Fork 2
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
Avoid failover delays in twemproxy reconfig when using master targets #277
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3scale-robot
added
the
priority/important-soon
Must be staffed and worked on either currently, or very soon, ideally in time for the next sprint.
label
Oct 16, 2023
3scale-robot
added
needs-size
Indicates a PR or issue lacks a `size/foo` label and requires one.
size/M
Requires about a day to complete the PR or the issue.
and removed
needs-size
Indicates a PR or issue lacks a `size/foo` label and requires one.
labels
Oct 16, 2023
roivaz
force-pushed
the
avoid-failover-delays
branch
from
October 17, 2023 09:08
b89c11a
to
d9cab77
Compare
slopezz
approved these changes
Oct 17, 2023
LGTM label has been added. Git tree hash: 578f6ba3019e17ab6a204433a2579a70b46a1fdf
|
It seems that even though the "sentinel master <shard_name>" command returns updated information about the master as soon as a slave is promoted, there is an exeption with the sentinel instance that acts as "failover leader". The failover leader is the instance that actually performs the shard reconfigurations, and in this case, its "sentinel master <shard_name>" command only returns updated information when all the slaves have been reconfigured to point to the new master. This causes delays in twemproxy reconfiguration if this is the instance being used to "discover" the shard. To detect this situation, add a step that checks the master address with the command "sentinel get-master-addr-by-name <shard_name>". This command always returns updated master information, even if we are querying the leader sentinel instance.
roivaz
force-pushed
the
avoid-failover-delays
branch
from
October 17, 2023 09:14
d9cab77
to
79e9e89
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: roivaz The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
3scale-robot
added
the
approved
Indicates a PR has been approved by an approver from all required OWNERS files.
label
Oct 17, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
approved
Indicates a PR has been approved by an approver from all required OWNERS files.
kind/bug
Categorizes issue or PR as related to a bug.
lgtm
Indicates that a PR is ready to be merged.
priority/important-soon
Must be staffed and worked on either currently, or very soon, ideally in time for the next sprint.
size/M
Requires about a day to complete the PR or the issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It seems that even though the "sentinel master <shard_name>" command returns updated information about the master as soon as a slave is promoted, there is an exception with the sentinel instance that acts as "failover leader". The failover leader is the instance that actually performs the shard reconfigurations, and in this case, its "sentinel master <shard_name>" command only returns updated information when all the slaves have been also reconfigured to point to the new master. This causes delays in twemproxy reconfiguration if this is the instance used by the twemproxyconfig controller to "discover" the shard.
To detect this situation, add a step that checks the master address with the command "sentinel get-master-addr-by-name <shard_name>". This command always returns updated master information, even if we are querying the leader sentinel instance.
This must be merged before #276 as it should be included in the new release.
/kind bug
/priority important-soon
/assign