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

Add dynamic config for per instance visibility API rate limit #2585

Merged
merged 4 commits into from Mar 8, 2022

Conversation

meiliang86
Copy link
Contributor

What changed?
Add dynamic config for per instance visibility API rate limit

Why?
Service protection.

How did you test it?
Existing tests?

Potential risks
rate limits are set wrong and frontend calls are accepted or rejected wrongfully

Is hotfix candidate?
Yes

@meiliang86 meiliang86 requested a review from a team as a code owner March 7, 2022 23:00
@wxing1292
Copy link
Contributor

can you plz take a look at this example?

i believe this might be better

@@ -152,6 +152,8 @@ const (
FrontendMaxNamespaceBurstPerInstance = "frontend.namespaceBurst"
// FrontendMaxNamespaceCountPerInstance is workflow namespace count limit per second
FrontendMaxNamespaceCountPerInstance = "frontend.namespaceCount"
// FrontendMaxVisibilityNamespaceRPSPerInstance is namespace rate limit per second for visibility APIs
FrontendMaxVisibilityNamespaceRPSPerInstance = "frontend.visibilityNamespaceRPS"
Copy link
Member

Choose a reason for hiding this comment

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

how about frontend.namespaceRPS.visibility ?

Comment on lines 71 to 80
testGetIntPropertyFilteredByNamespaceApiTypeKey:
- value: 30
constraints: {}
- value: 20
constraints:
namespace: samples-namespace
- value: 10
constraints:
namespace: samples-namespace
apiType: visibility
Copy link
Member

Choose a reason for hiding this comment

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

can you set a default RPS for visibility to 10 for all namespace?

@meiliang86 meiliang86 merged commit 6fa5b4a into temporalio:master Mar 8, 2022
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.

None yet

3 participants