Skip to content

Commit

Permalink
Merge pull request grafana/cortex-jsonnet#278 from grafana/scaling-rules
Browse files Browse the repository at this point in the history
Add recording rules to calculate Cortex scaling
  • Loading branch information
tomwilkie authored Mar 19, 2021
2 parents b5b73a4 + 892ecb2 commit beb8044
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion operations/mimir/ingester.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
),

ingester_statefulset_args::
$._config.grpcConfig +
$._config.grpcConfig
{
'ingester.wal-enabled': true,
'ingester.checkpoint-enabled': true,
Expand Down
20 changes: 10 additions & 10 deletions operations/mimir/query-frontend.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
local container = $.core.v1.container,

query_frontend_args::
$._config.grpcConfig +
$._config.grpcConfig
{
target: 'query-frontend',

Expand Down Expand Up @@ -38,17 +38,17 @@
'limits.per-user-override-config': '/etc/cortex/overrides.yaml',
} + (
if $._config.queryFrontend.sharded_queries_enabled then
{
'querier.parallelise-shardable-queries': 'true',
{
'querier.parallelise-shardable-queries': 'true',

// in process tenant queues on frontends. We divide by the number of frontends; 2 in this case in order to apply the global limit in aggregate.
// basically base * shard_factor * query_split_factor / num_frontends where
'querier.max-outstanding-requests-per-tenant': std.floor(200 * $._config.queryFrontend.shard_factor * $._config.queryFrontend.query_split_factor / $._config.queryFrontend.replicas),
// in process tenant queues on frontends. We divide by the number of frontends; 2 in this case in order to apply the global limit in aggregate.
// basically base * shard_factor * query_split_factor / num_frontends where
'querier.max-outstanding-requests-per-tenant': std.floor(200 * $._config.queryFrontend.shard_factor * $._config.queryFrontend.query_split_factor / $._config.queryFrontend.replicas),

'querier.query-ingesters-within': $._config.queryConfig['querier.query-ingesters-within'],
} + $._config.storageConfig
else {}
),
'querier.query-ingesters-within': $._config.queryConfig['querier.query-ingesters-within'],
} + $._config.storageConfig
else {}
),

query_frontend_container::
container.new('query-frontend', $._images.query_frontend) +
Expand Down

0 comments on commit beb8044

Please sign in to comment.