Skip to content

Dynamic tenant shard sizes #5374

@harry671003

Description

@harry671003

Is your feature request related to a problem? Please describe.
AWS is working on auto-scaling various components in the query path based on resource utilization. However, auto-scaling just the number of pods will not change the total shards allocated to a tenant.

Currently, the tenant shard sizes can only be constants.

max_queriers_per_tenant: 10
store_gateway_tenant_shard_size: 30
compactor_tenant_shard_size: 5
ruler_tenant_shard_size: 3
ingestion_tenant_shard_size: 100

It'll be really great to have the option to set shard sizes that grow or shrink dynamically with the total number of pods for each component.

Describe the solution you'd like
One approach to do this would be to introduce a type param on the config which can be either percent or number.
If type is percent the shard size will dynamically grow and shrink with the total pods for the component.

max_queriers_per_tenant:
  type: percent
  value: 40 # Sets the shard size to be 40% the total queriers.

store_gateway_tenant_shard_size:
  type: percent
  value: 40 # Sets the SG shard size to be 40% of the total pods.

ingestion_tenant_shard_size:
  type: number
  value: 100 # Sets the shard size to be 100 ingesters. This will not grow dynamically.

Describe alternatives you've considered
Alternative, I've considered is to have a controller that will watch the number of pods for say querier and update the runtime-config with the shard size. This would require an additional component that is not part of Cortex to dynamically resize the shard sizes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions