Skip to content

Commit 15b5caa

Browse files
committed
operations/mimir: Set max buffered bytes in the Kafka client used by the ruler
Signed-off-by: Arve Knudsen <[email protected]>
1 parent 39cf943 commit 15b5caa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

operations/mimir/ruler.libsonnet

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@
3737
// Don't depend on Memcached on startup.
3838
'blocks-storage.bucket-store.metadata-cache.memcached.dns-ignore-startup-failures': true,
3939
'ruler-storage.cache.memcached.dns-ignore-startup-failures': true,
40-
},
40+
} + if $._config.ingest_storage_enabled then {
41+
// Set the max buffered bytes in the Kafka client used by the ruler based on the expected max rule evaluation response size,
42+
// clamping it between 1 GB (default) and 4 GB.
43+
'ingest-storage.kafka.producer-max-buffered-bytes': std.clamp(10 * $._config.ruler_remote_evaluation_max_query_response_size_bytes, 1024 * 1024 * 1024, 4 * 1024 * 1024 * 1024),
44+
} else {},
4145

4246
ruler_env_map:: {
4347
JAEGER_REPORTER_MAX_QUEUE_SIZE: '1000',

0 commit comments

Comments
 (0)