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

Prioritize UI/tctl when system is throttled #4623

Merged
merged 11 commits into from
Jul 18, 2023

Conversation

pdoerner
Copy link
Contributor

What changed?

  • Added a new possible value for the caller-type header: operator
  • This header should be set by web UI and tctl to indicate that requests should be given higher precedence
  • Rate limiters for persistence, history, matching, and visibility were updated with a new priority corresponding to operator requests
  • These new priorities have a lower RPS limit to prevent abusing the header to get high priority for all requests. Currently the operator priority is allowed 20% of the rate of the existing rate limiters

Why?
When the system is being throttled, users would like to be able to debug using the web UI and/or tctl without running into rate limit errors

How did you test it?
New unit tests

Potential risks
The operator RPS is set too low leading to new rate limit errors

Is hotfix candidate?
No

@pdoerner pdoerner requested a review from a team as a code owner July 13, 2023 18:08
@pdoerner pdoerner requested a review from yycptt July 13, 2023 18:08
Copy link
Member

@yycptt yycptt left a comment

Choose a reason for hiding this comment

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

Can you double check if visibility persistence client has any rate limiter? If so that probably should also be updated.

common/persistence/client/quotas.go Outdated Show resolved Hide resolved
common/persistence/client/quotas.go Outdated Show resolved Hide resolved
service/frontend/configs/quotas.go Outdated Show resolved Hide resolved
service/history/configs/quotas_test.go Outdated Show resolved Hide resolved
@pdoerner pdoerner requested a review from yycptt July 14, 2023 21:08
Copy link
Member

@yycptt yycptt left a comment

Choose a reason for hiding this comment

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

Overall LGTM. Please land after addressing the comments.

common/persistence/visibility/quotas.go Outdated Show resolved Hide resolved
@pdoerner pdoerner merged commit ba5b23d into temporalio:master Jul 18, 2023
@pdoerner pdoerner deleted the rate-limit-prioritize-ui branch July 18, 2023 16:50
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