From 32f6dfe10fc6c7cd87b1fd7a4429e3cd012490bd Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Tue, 1 Aug 2023 07:30:21 +0300 Subject: [PATCH 1/2] Docs: throttler uses gRPC for inter-tablet communication Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- content/en/docs/18.0/reference/features/tablet-throttler.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/18.0/reference/features/tablet-throttler.md b/content/en/docs/18.0/reference/features/tablet-throttler.md index 8a0c5b958..44c54f987 100644 --- a/content/en/docs/18.0/reference/features/tablet-throttler.md +++ b/content/en/docs/18.0/reference/features/tablet-throttler.md @@ -45,7 +45,7 @@ In addition, the primary tablet is responsible for the overall health of the clu - The throttler confirms it is still the primary tablet for its shard. - Every `10sec`, the throttler uses the topology server to refresh the shard's tablets list. -- The throttler probes all `REPLICA` tablets for their replication lag. This is done by querying the `_vt.heartbeat` table. +- The throttler probes all `REPLICA` tablets for their own throttler metrics. This is done via gRPC. - The throttler begins in dormant probe mode. As long as no application or client is actually looking for metrics, it probes the servers at multi-second intervals. - When applications check for throttle advice, the throttler begins probing servers in subsecond intervals. It reverts to dormant probe mode if no requests are made in the duration of `1min`. - The throttler aggregates the last probed values from all relevant tablets. This is _the cluster's metric_. From 4fd51315ae4b96121a166586c958210b38bff170 Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Tue, 1 Aug 2023 07:35:56 +0300 Subject: [PATCH 2/2] document --throttle_tablet_types Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- content/en/docs/18.0/reference/features/tablet-throttler.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/en/docs/18.0/reference/features/tablet-throttler.md b/content/en/docs/18.0/reference/features/tablet-throttler.md index 44c54f987..6dc66be79 100644 --- a/content/en/docs/18.0/reference/features/tablet-throttler.md +++ b/content/en/docs/18.0/reference/features/tablet-throttler.md @@ -45,7 +45,7 @@ In addition, the primary tablet is responsible for the overall health of the clu - The throttler confirms it is still the primary tablet for its shard. - Every `10sec`, the throttler uses the topology server to refresh the shard's tablets list. -- The throttler probes all `REPLICA` tablets for their own throttler metrics. This is done via gRPC. +- The throttler probes all `REPLICA` tablets (or other types of tablets, see [Configuration](#configuration)) for their own throttler metrics. This is done via gRPC. - The throttler begins in dormant probe mode. As long as no application or client is actually looking for metrics, it probes the servers at multi-second intervals. - When applications check for throttle advice, the throttler begins probing servers in subsecond intervals. It reverts to dormant probe mode if no requests are made in the duration of `1min`. - The throttler aggregates the last probed values from all relevant tablets. This is _the cluster's metric_. @@ -135,6 +135,8 @@ See [vtctl UpdateThrottlerConfig](../../programs/vtctl/throttler#updatethrottler If you are still using the `v15` flags, you will have to transition to the new throttler configuration scheme: first populate topo with a new throttler configuration via `UpdateThrottlerConfig`. At the very least, set a `--threshold`. You likely also want to `--enable`. Then, reconfigure `vttablet`s with `--throttler-config-via-topo`, and restart them. +The list of tablet types included in the throttler's logic is dictated by `vttablet --throttle_tablet_types`. The value is a comma delimited list of tablet types. The default value is `"replica"`. You may, for example, set it to be `"replica,rdonly"`. + ## Heartbeat configuration Enabling the lag throttler also automatically enables heartbeat injection. The follwing `vttablet` flags further control heartbeat behavior: