Skip to content
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

Tablet throttler documentation (references/features) #512

Merged
merged 13 commits into from
Oct 15, 2020

Conversation

shlomi-noach
Copy link
Contributor

Documenting vitessio/vitess#6668: the tablet throttler. background, overview, configuration, API, usage

Only merge once vitessio/vitess#6668 is merged.

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
@netlify
Copy link

netlify bot commented Sep 9, 2020

Deploy preview for vitess ready!

Built with commit c3c905e

https://deploy-preview-512--vitess.netlify.app

@shlomi-noach
Copy link
Contributor Author

ping. Request for review 🙏

…cas exist

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: Jacques Grove <aquarapid@gmail.com>
Copy link
Collaborator

@aquarapid aquarapid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed some slight changes. LGTM

content/en/docs/reference/features/tablet-throttler.md Outdated Show resolved Hide resolved
content/en/docs/reference/features/tablet-throttler.md Outdated Show resolved Hide resolved
content/en/docs/reference/features/tablet-throttler.md Outdated Show resolved Hide resolved
content/en/docs/reference/features/tablet-throttler.md Outdated Show resolved Hide resolved
Apps will use `/throttler/check`

- Apps may indicate their identity via `?app=<name>` param.
- Apps may further declare themselves to be _low priority_ via `?p=low` param. Managed online schema migrations (`gh-ost`, `pt-online-schema-change`) do so, as does the table purge process.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the significance of low priority?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's actually very significant: today, we only use the throttler fo rstrictly offline processes: schema migrations and table purging. But, in the future, an app may want to use the throttler for bulk writes, imports, etc. The app is less tolerant to delays. If the app wants to import 10,000,000 rows into a table, and a migration runs on another table, then the two will collide; they will both make slow progress, but while th emigration doesn't case, the app will care. That's why we put migrations and table purges on low priority, such that they will yield to apps with "normal" priority. At GitHub, this change made a huge impact to application behavior.

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Copy link
Contributor

@bnlandry bnlandry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This document contains very thorough information. Most of my comments are stylistic.

content/en/docs/reference/features/tablet-throttler.md Outdated Show resolved Hide resolved
content/en/docs/reference/features/tablet-throttler.md Outdated Show resolved Hide resolved
content/en/docs/reference/features/tablet-throttler.md Outdated Show resolved Hide resolved
content/en/docs/reference/features/tablet-throttler.md Outdated Show resolved Hide resolved
content/en/docs/reference/features/tablet-throttler.md Outdated Show resolved Hide resolved
content/en/docs/reference/features/tablet-throttler.md Outdated Show resolved Hide resolved
content/en/docs/reference/features/tablet-throttler.md Outdated Show resolved Hide resolved
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>
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>
@shlomi-noach
Copy link
Contributor Author

ping

@bnlandry I've responded to all but one review comments (see following) - does this look good now?

@askdba @deepthi @sougou please see my question: #512 (comment)

Copy link
Contributor

@bnlandry bnlandry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!


VTTablet runs a cooperative throttling service. This service probes the shard's MySQL topology and observes replication lag on servers. This throttler is derived from GitHub's [freno](https://github.com/github/freno).

_Note: the Vitess documentation is transitioning from the term "Master" (with regard to MySQL replication) to "Primary". this document reflects this transition._
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_Note: the Vitess documentation is transitioning from the term "Master" (with regard to MySQL replication) to "Primary". this document reflects this transition._
_Note: with regard to MySQL replication, the Vitess documentation is transitioning from the term 'master' to the term 'primary.' This document reflects this transition._


The user may override the heartbeat interval by sending `-heartbeat_interval` flag to `vttablet`.

Thus, the aggregated interval can be off, by default, by some `500ms`. This makes it inaccurate for evaluations that require high resolution lag evaluation. This resolution is sufficient for throttling purposes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Thus, the aggregated interval can be off, by default, by some `500ms`. This makes it inaccurate for evaluations that require high resolution lag evaluation. This resolution is sufficient for throttling purposes.
Thus, the aggregated interval can be off, by default, by about `500ms`. This makes it inaccurate for evaluations that require high resolution lag evaluation. This resolution is sufficient for throttling purposes.

@shlomi-noach shlomi-noach merged commit 488e6f2 into prod Oct 15, 2020
@shlomi-noach shlomi-noach deleted the vttablet-throttle branch October 15, 2020 05:47
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.

4 participants