You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Added global ingester limits.
Signed-off-by: Peter Štibraný <[email protected]>
* Add tests for global limits.
Signed-off-by: Peter Štibraný <[email protected]>
* Expose current limits used by ingester via metrics.
Signed-off-by: Peter Štibraný <[email protected]>
* Add max inflight requests limit.
Signed-off-by: Peter Štibraný <[email protected]>
* Added test for inflight push requests.
Signed-off-by: Peter Štibraný <[email protected]>
* Docs.
Signed-off-by: Peter Štibraný <[email protected]>
* Debug log.
Signed-off-by: Peter Štibraný <[email protected]>
* Test for unmarshalling.
Signed-off-by: Peter Štibraný <[email protected]>
* Nil default global limits.
Signed-off-by: Peter Štibraný <[email protected]>
* CHANGELOG.md
Signed-off-by: Peter Štibraný <[email protected]>
* Expose current ingestion rate as gauge.
Signed-off-by: Peter Štibraný <[email protected]>
* Expose number of inflight requests.
Signed-off-by: Peter Štibraný <[email protected]>
* Change ewmaRate to use RWMutex.
Signed-off-by: Peter Štibraný <[email protected]>
* Rename globalLimits to instanceLimits.
Rename max_users to max_tenants.
Removed extra parameter to `getOrCreateTSDB`
Signed-off-by: Peter Štibraný <[email protected]>
* Rename globalLimits to instanceLimits, fix users -> tenants, explain that these limits only work when using blocks engine.
Signed-off-by: Peter Štibraný <[email protected]>
* Rename globalLimits to instanceLimits, fix users -> tenants, explain that these limits only work when using blocks engine.
Signed-off-by: Peter Štibraný <[email protected]>
* Remove details from error messages.
Signed-off-by: Peter Štibraný <[email protected]>
* Comment.
Signed-off-by: Peter Štibraný <[email protected]>
* Fix series count when closing non-empty TSDB.
Signed-off-by: Peter Štibraný <[email protected]>
* Added new failure modes to benchmark.
Signed-off-by: Peter Štibraný <[email protected]>
* Fixed docs.
Signed-off-by: Peter Štibraný <[email protected]>
* Tick every second.
Signed-off-by: Peter Štibraný <[email protected]>
* Fix CHANGELOG.md
Signed-off-by: Peter Štibraný <[email protected]>
* Review feedback.
Signed-off-by: Peter Štibraný <[email protected]>
* Review feedback.
Signed-off-by: Peter Štibraný <[email protected]>
* Remove forgotten fmt.Println.
Signed-off-by: Peter Štibraný <[email protected]>
* Use error variables.
Signed-off-by: Peter Štibraný <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,7 @@
27
27
*[ENHANCEMENT] Allow use of `y|w|d` suffixes for duration related limits and per-tenant limits. #4044
28
28
*[ENHANCEMENT] Query-frontend: Small optimization on top of PR #3968 to avoid unnecessary Extents merging. #4026
29
29
*[ENHANCEMENT] Add a metric `cortex_compactor_compaction_interval_seconds` for the compaction interval config value. #4040
30
+
*[ENHANCEMENT] Ingester: added following per-ingester (instance) limits: max number of series in memory (`-ingester.instance-limits.max-series`), max number of users in memory (`-ingester.instance-limits.max-tenants`), max ingestion rate (`-ingester.instance-limits.max-ingestion-rate`), and max inflight requests (`-ingester.instance-limits.max-inflight-push-requests`). These limits are only used when using blocks storage. Limits can also be configured using runtime-config feature, and current values are exported as `cortex_ingester_instance_limits` metric. #3992.
30
31
*[BUGFIX] Ruler-API: fix bug where `/api/v1/rules/<namespace>/<group_name>` endpoint return `400` instead of `404`. #4013
31
32
*[BUGFIX] Distributor: reverted changes done to rate limiting in #3825. #3948
32
33
*[BUGFIX] Ingester: Fix race condition when opening and closing tsdb concurrently. #3959
f.DurationVar(&cfg.ActiveSeriesMetricsUpdatePeriod, "ingester.active-series-metrics-update-period", 1*time.Minute, "How often to update active series metrics.")
122
126
f.DurationVar(&cfg.ActiveSeriesMetricsIdleTimeout, "ingester.active-series-metrics-idle-timeout", 10*time.Minute, "After what time a series is considered to be inactive.")
123
127
f.BoolVar(&cfg.StreamChunksWhenUsingBlocks, "ingester.stream-chunks-when-using-blocks", false, "Stream chunks when using blocks. This is experimental feature and not yet tested. Once ready, it will be made default and this config option removed.")
128
+
129
+
f.Float64Var(&cfg.DefaultLimits.MaxIngestionRate, "ingester.instance-limits.max-ingestion-rate", 0, "Max ingestion rate (samples/sec) that ingester will accept. This limit is per-ingester, not per-tenant. Additional push requests will be rejected. Current ingestion rate is computed as exponentially weighted moving average, updated every second. This limit only works when using blocks engine. 0 = unlimited.")
130
+
f.Int64Var(&cfg.DefaultLimits.MaxInMemoryTenants, "ingester.instance-limits.max-tenants", 0, "Max users that this ingester can hold. Requests from additional users will be rejected. This limit only works when using blocks engine. 0 = unlimited.")
131
+
f.Int64Var(&cfg.DefaultLimits.MaxInMemorySeries, "ingester.instance-limits.max-series", 0, "Max series that this ingester can hold (across all tenants). Requests to create additional series will be rejected. This limit only works when using blocks engine. 0 = unlimited.")
132
+
f.Int64Var(&cfg.DefaultLimits.MaxInflightPushRequests, "ingester.instance-limits.max-inflight-push-requests", 0, "Max inflight push requests that this ingester can handle (across all tenants). Additional requests will be rejected. 0 = unlimited.")
124
133
}
125
134
126
135
// Ingester deals with "in flight" chunks. Based on Prometheus 1.x
@@ -167,6 +176,10 @@ type Ingester struct {
167
176
168
177
// Prometheus block storage
169
178
TSDBStateTSDBState
179
+
180
+
// Rate of pushed samples. Only used by V2-ingester to limit global samples push rate.
181
+
ingestionRate*ewmaRate
182
+
inflightPushRequests atomic.Int64
170
183
}
171
184
172
185
// ChunkStore is the interface we need to store chunks
0 commit comments