Skip to content

Add throttle-app, unthrottle-app, and app-metrics to vtctld throttler update-config - #1313

Open
maxenglander wants to merge 3 commits into
mainfrom
maxeng/update-throttler-config-apps
Open

Add throttle-app, unthrottle-app, and app-metrics to vtctld throttler update-config#1313
maxenglander wants to merge 3 commits into
mainfrom
maxeng/update-throttler-config-apps

Conversation

@maxenglander

@maxenglander maxenglander commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Problem:

pscale branch vtctld throttler update-config only exposed --keyspace, --enabled (required), and --threshold. Per-app throttle, unthrottle, and app-checked metrics still needed raw vtctldclient.

Solution:

  1. Make --enabled optional.
  2. Add --throttle-app, --throttle-app-ratio, --throttle-app-duration, --unthrottle-app, --app-name, --app-metrics.
  3. Require at least one mutation flag.

Depends on: planetscale/planetscale-go#331 (API surface; CLI keeps its vendored client)

Example:

pscale branch vtctld throttler update-config <db> <branch> \
  --keyspace <ks> \
  --throttle-app rowstreamer --throttle-app-ratio 0.5 --throttle-app-duration 96h \
  --app-name rowstreamer --app-metrics lag,loadavg

pscale branch vtctld throttler update-config <db> <branch> \
  --keyspace <ks> --unthrottle-app rowstreamer

Testing:

  • Unit
  • Manual against a branch with vtctld access

Made with Cursor

maxenglander and others added 3 commits July 28, 2026 16:11
… update-config.

Matches Inventory2 Staging Runbook vtctldclient UpdateThrottlerConfig
flags so those steps can run via pscale without pskube.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Max Englander <max@planetscale.com>
…t defaults.

vtctldclient allows keyspace-only calls and uses ratio 1.0 / duration 1h
defaults. Use cobra MarkFlagsMutuallyExclusive / RequiredTogether for the
same flag constraints.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Max Englander <max@planetscale.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Max Englander <max@planetscale.com>
@maxenglander
maxenglander marked this pull request as ready for review July 28, 2026 21:20
@maxenglander
maxenglander requested a review from a team as a code owner July 28, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants