Skip to content

Improve CreateRuleGroup for tenant with no RulerMaxRuleGroupsPerTenant limit #5646

@emanlodovice

Description

@emanlodovice

Describe the bug
The ruler CreateRuleGroup api still lists all rule groups under the tenant even if the RulerMaxRuleGroupsPerTenant for the tenant is 0. For huge workspaces with no limit set this results to unnecessary latency.
https://github.com/cortexproject/cortex/blob/master/pkg/ruler/api.go#L530

To Reproduce

  1. Create a 3 thousand rule groups under a workspace
  2. Notice that the latency of the create calls increases even if the workspace has no set limit on the number of rule groups.

Expected behavior
CreateRuleGroup should skip listing all rule groups if RulerMaxRuleGroupsPerTenant is not set.

Additional Context

Metadata

Metadata

Assignees

Labels

component/rulesBits & bobs todo with rules and alerts: the ruler, config service etc.help wanted

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions