Tablet throttler: support for custom query & threshold#7541
Merged
deepthi merged 9 commits intovitessio:masterfrom Mar 18, 2021
Merged
Tablet throttler: support for custom query & threshold#7541deepthi merged 9 commits intovitessio:masterfrom
deepthi merged 9 commits intovitessio:masterfrom
Conversation
…ottle_metrics_threshold Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Contributor
Author
|
Testing TBD via |
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Contributor
Author
|
(still draft; will take out of draft mode when tests are satisfied) |
…o interpret a SHOW GLOBAL query. Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Contributor
Author
|
Added support for |
…s_self_check Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Contributor
Author
|
Ready for review. |
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Contributor
Author
|
Kind ping, cc @aquarapid |
Contributor
Author
|
ping for review |
Collaborator
|
I'm going to merge this now. If there are other comments, they can be handled in a separate PR. |
Contributor
|
Validated as described; thanks! The only additional feature request I would have is to add the metric threshold to the |
Contributor
Author
Creating a separate issue for that |
This was referenced Mar 25, 2021
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR introduces
vttabletcommand line flags, which allow the user to customize the tablet throttler behavior:-throttle_metrics_query(string)-throttle_metrics_threshold(float)-throttle_check_as_check_self(bool)The default behavior is for the throttler to check replication lag (where the lag threshold can be customized via the already existing
-throttle_threshold).However, the user may want to run a custom query. They are allowed to run:
SELECTquery that returns a single row, single value, float/numeric data typeSHOW GLOBAL (STATUS|VARIABLES) LIKE '<variable-name>'An example use case would be:
vttablet -throttle_metrics_query "show global status like 'threads_running'" -throttle_metrics_threshold 150 -throttle_check_as_check_selfThe flag
throttle_check_as_check_selfis desired because the default throttler behavior, for writes, is to consider the overall health of the shard: the default check is for replication lag, and the throttler runs the lag evaluation query on all replicas on the shard. However, if the user wants to measure e.g.Threads_runningon the primary only, then the flagthrottle_check_as_check_selftreats any write-check as "check-self" request, which only reads metrics on the specific tablet.Checklist
Impacted Areas in Vitess
Components that this PR will affect: