Skip to content

Commit d3f46c5

Browse files
authored
Documentation for ingester instance limits in runtime configuration (cortexproject#4510)
* Documentation for ingester instance limits in runtime configuration Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com> * Lint fixes Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com> * Code review feedback Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com> * Clarify results of hitting limits Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>
1 parent 62022c8 commit d3f46c5

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

docs/configuration/arguments.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ It also talks to a KVStore and has it's own copies of the same flags used by the
404404

405405
Cortex has a concept of "runtime config" file, which is simply a file that is reloaded while Cortex is running. It is used by some Cortex components to allow operator to change some aspects of Cortex configuration without restarting it. File is specified by using `-runtime-config.file=<filename>` flag and reload period (which defaults to 10 seconds) can be changed by `-runtime-config.reload-period=<duration>` flag. Previously this mechanism was only used by limits overrides, and flags were called `-limits.per-user-override-config=<filename>` and `-limits.per-user-override-period=10s` respectively. These are still used, if `-runtime-config.file=<filename>` is not specified.
406406

407-
At the moment, two components use runtime configuration: limits and multi KV store.
407+
At the moment runtime configuration may contain per-user limits, multi KV store, and ingester instance limits.
408408

409409
Example runtime configuration file:
410410

@@ -422,6 +422,10 @@ overrides:
422422
multi_kv_config:
423423
mirror_enabled: false
424424
primary: memberlist
425+
426+
ingester_limits:
427+
max_ingestion_rate: 42000
428+
max_inflight_push_requests: 10000
425429
```
426430

427431
When running Cortex on Kubernetes, store this file in a config map and mount it in each services' containers. When changing the values there is no need to restart the services, unless otherwise specified.
@@ -506,6 +510,38 @@ Valid per-tenant limits are (with their corresponding flags for default values):
506510

507511
Requires `-distributor.replication-factor`, `-distributor.shard-by-all-labels`, `-distributor.sharding-strategy` and `-distributor.zone-awareness-enabled` set for the ingesters too.
508512

513+
## Ingester Instance Limits
514+
515+
Cortex ingesters support limits that are applied per-instance, meaning they apply to each ingester process. These can be used to ensure individual ingesters are not overwhelmed regardless of any per-user limits. These limits can be set under the `ingester.instance_limits` block in the global configuration file, with command line flags, or under the `ingester_limits` field in the runtime configuration file.
516+
517+
An example as part of the runtime configuration file:
518+
519+
```yaml
520+
ingester_limits:
521+
max_ingestion_rate: 20000
522+
max_series: 1500000
523+
max_tenants: 1000
524+
max_inflight_push_requests: 30000
525+
```
526+
527+
Valid ingester instance limits are (with their corresponding flags):
528+
529+
- `max_ingestion_rate` \ `--ingester.instance-limits.max-ingestion-rate`
530+
531+
Limit the ingestion rate in samples per second for an ingester. When this limit is reached, new requests will fail with an HTTP 500 error.
532+
533+
- `max_series` \ `-ingester.instance-limits.max-series`
534+
535+
Limit the total number of series that an ingester keeps in memory, across all users. When this limit is reached, requests that create new series will fail with an HTTP 500 error.
536+
537+
- `max_tenants` \ `-ingester.instance-limits.max-tenants`
538+
539+
Limit the maximum number of users an ingester will accept metrics for. When this limit is reached, requests from new users will fail with an HTTP 500 error.
540+
541+
- `max_inflight_push_requests` \ `-ingester.instance-limits.max-inflight-push-requests`
542+
543+
Limit the maximum number of requests being handled by an ingester at once. This setting is critical for preventing ingesters from using an excessive amount of memory during high load or temporary slow downs. When this limit is reached, new requests will fail with an HTTP 500 error.
544+
509545
## Storage
510546

511547
- `s3.force-path-style`

0 commit comments

Comments
 (0)