Skip to content

Commit

Permalink
Move away from zero-RPS == unlimited-RPS, as it isn't always correct (c…
Browse files Browse the repository at this point in the history
…adence-workflow#6468)

"Global" RPS limits have a surprising fallback that keeps confusing us:
if the configured RPS is zero, it ignores the limit entirely and only
uses the per-instance RPS (e.g. `FrontendMaxDomainVisibilityRPSPerInstance`).

But since these are generally used in a tiered setup with those same limits,
this doesn't really do anything except repeatedly mislead us that "0" means
"unlimited" because the per-instance-RPS values are generally very high.

So this moves one away and adds some documentation about it.  There may be
others, but they aren't adjusted anywhere near as much as these three.
  • Loading branch information
Groxx authored Nov 4, 2024
1 parent 2655dc3 commit c7dfbd6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions common/dynamicconfig/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ const (
//
// KeyName: frontend.globalDomainrps
// Value type: Int
// Default value: 0
// Default value: UnlimitedRPS (0 triggers a fallback to per-instance-RPS, generally avoid)
// Allowed filters: DomainName
FrontendGlobalDomainUserRPS
// FrontendGlobalDomainWorkerRPS is used to limit "worker" requests (PollFor...Task, RespondTask..., etc)
Expand All @@ -613,7 +613,7 @@ const (
//
// KeyName: frontend.globalDomainWorkerrps
// Value type: Int
// Default value: UnlimitedRPS
// Default value: UnlimitedRPS (0 triggers a fallback to per-instance-RPS, generally avoid)
// Allowed filters: DomainName
FrontendGlobalDomainWorkerRPS
// FrontendGlobalDomainVisibilityRPS is used to limit "visibility" requests (ListWorkflow* and similar)
Expand All @@ -628,7 +628,7 @@ const (
//
// KeyName: frontend.globalDomainVisibilityrps
// Value type: Int
// Default value: UnlimitedRPS
// Default value: UnlimitedRPS (0 triggers a fallback to per-instance-RPS, generally avoid)
// Allowed filters: DomainName
FrontendGlobalDomainVisibilityRPS
// FrontendGlobalDomainAsyncRPS is used to limit "async" requests (StartWorkflowAsync, etc for many "user" APIs)
Expand Down Expand Up @@ -3107,7 +3107,7 @@ var IntKeys = map[IntKey]DynamicInt{
KeyName: "frontend.globalDomainrps",
Filters: []Filter{DomainName},
Description: "FrontendGlobalDomainUserRPS is workflow domain rate limit per second for the whole Cadence cluster",
DefaultValue: 0,
DefaultValue: UnlimitedRPS,
},
FrontendGlobalDomainWorkerRPS: {
KeyName: "frontend.globalDomainWorkerrps",
Expand Down

0 comments on commit c7dfbd6

Please sign in to comment.