Skip to content

Commit 3faf67e

Browse files
committed
Add default instance limits for distributors and ingesters
Signed-off-by: Friedrich Gonzalez <[email protected]>
1 parent cb68f90 commit 3faf67e

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Changelog
22

33
## master / unreleased
4+
* [CHANGE] Add default max series for ingesters
5+
* [CHANGE] Add default max inflight pushes for distributors
46
* [CHANGE] Remove mem-ballast from distributor and querier.
57
* [CHANGE] Increase cpu requests for querier to 2.
68
* [CHANGE] Configure default GOMAXPROCS and GOMEMLIMIT for all cortex modules

cortex/config.libsonnet

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -395,13 +395,12 @@
395395
ingester_stream_chunks_when_using_blocks: true,
396396

397397
// Ingester limits are put directly into runtime config, if not null. Available limits:
398-
// ingester_instance_limits: {
399-
// max_inflight_push_requests: 0, // Max inflight push requests per ingester. 0 = no limit.
400-
// max_ingestion_rate: 0, // Max ingestion rate (samples/second) per ingester. 0 = no limit.
401-
// max_series: 0, // Max number of series per ingester. 0 = no limit.
402-
// max_tenants: 0, // Max number of tenants per ingester. 0 = no limit.
403-
// },
404-
ingester_instance_limits: null,
398+
ingester_instance_limits: {
399+
// max_inflight_push_requests: , // Max inflight push requests per ingester. 0 = no limit.
400+
// max_ingestion_rate: 0, // Max ingestion rate (samples/second) per ingester. 0 = no limit.
401+
max_series: 4.8e+6, // Max number of series per ingester. 0 = no limit. 4.8 million is closely tied to 15Gb in requests per ingester
402+
// max_tenants: 0, // Max number of tenants per ingester. 0 = no limit.
403+
},
405404
},
406405

407406
local configMap = $.core.v1.configMap,

cortex/distributor.libsonnet

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
// Do not extend the replication set on unhealthy (or LEAVING) ingester when "unregister on shutdown"
3232
// is set to false.
3333
'distributor.extend-writes': $._config.unregister_ingesters_on_shutdown,
34+
'distributor.instance-limits.max-inflight-push-requests': 60, //60 is very conservative to protect the distributor from OOMs
3435
},
3536

3637
distributor_env_map:: {

0 commit comments

Comments
 (0)