Tablet throttler: custom queries and threshold#729
Conversation
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
|
Deploy preview for vitess ready! Built with commit 85c071c |
|
Preview for specific change in this PR: https://deploy-preview-729--vitess.netlify.app/docs/reference/features/tablet-throttler/#custom-metrics--queries |
hallaroo
left a comment
There was a problem hiding this comment.
I had a couple grammar/link changes, but will leave @aquarapid to review the content. Thanks!
| --- | ||
|
|
||
| VTTablet runs a cooperative throttling service. This service probes the shard's MySQL topology and observes health, measure by replication lag, on servers. This throttler is derived from GitHub's [freno](https://github.com/github/freno). | ||
| VTTablet runs a cooperative throttling service. This service probes the shard's MySQL topology and observes health, measure by replication lag, or by other metric delivered by custom query, on servers. This throttler is derived from GitHub's [freno](https://github.com/github/freno). |
There was a problem hiding this comment.
VTTablet runs a cooperative throttling service. This service probes the shard's MySQL topology and observes health, measured by replication lag, or by another metric delivered by custom query, on servers.
|
|
||
| The default behavior is to measure replication lag and throttle based on that lag. Vitess allows the user to use custom metrics and thresholds for throttling. | ||
|
|
||
| Vitess only supports gauges for custom metrics: the user may define a query which returns a gauge value, an absolute metric by which Vitess can throttle. See #configuration, below. |
There was a problem hiding this comment.
See [#configuration](../#configuration) below.
| When the throttler is enabled, it implicitly also runs heartbeat injections. | ||
| - Use the `vttablet` flag `-throttle_threshold` to set a lag threshold value. The default threshold is `1sec` and is set upon tablet startup. For example, to set a half-second lag threshold, use the flag `-throttle_threshold=0.5s`. | ||
| - To set the tablet types that the throttler queries for lag, use the `vttablet` flag `-throttle_tablet_types="replica,rdonly"`. The default tablet type is `replica`; this type is always implicitly included in the tablet types list. You may add any other tablet type. Any type not specified is ignored by the throttler. | ||
| - To override default lag evaluation, and measure a different metric, use `-throttle_metrics_query`. The query must be either of these forms: |
There was a problem hiding this comment.
To override the default lag evaluation, and measure a different metric, use -throttle_metrics_query.
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
|
I don't know if we want to wait for anyone else to review the content, but I'm happy to merge if my review is enough. Thanks! |
Documenting the changes in vitessio/vitess#7541
This documentation change explains how to configure custom throttler queries and threshold, and the use of
-throttle_check_as_check_self.