Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document operation with the query scheduler. #4100

Merged
merged 24 commits into from
Aug 10, 2021
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
0f3f63e
Support Cortex Frontend V2.
jeschkies Jul 28, 2021
5775a5e
Format code.
jeschkies Jul 28, 2021
269a10d
Merge remote-tracking branch 'grafana/main' into karsten/frontendv2
jeschkies Jul 28, 2021
c24764d
Start query scheduler in Docker compose.
jeschkies Jul 28, 2021
4311f19
Model query flow in sequence diagram.
jeschkies Jul 13, 2021
a115fc1
Model calls to downstreamer.
jeschkies Jul 14, 2021
19cc025
Move diagram to docs.
jeschkies Jul 14, 2021
55d8048
Embed generated SVG.
jeschkies Jul 15, 2021
6258012
Descripe calls.
jeschkies Jul 15, 2021
43dc83d
Launch Cortex query scheduler.
jeschkies Jul 29, 2021
b9becc6
Disable sharding for now.
jeschkies Jul 29, 2021
671a1e8
Log which framework is used.
jeschkies Jul 29, 2021
7230e7c
Configure querier to use scheduler.
jeschkies Jul 30, 2021
39224ce
Remove unwanted docs.
jeschkies Jul 30, 2021
2875a8f
Enable query splitting again.
jeschkies Jul 30, 2021
62c0f56
Document scheduler address.
jeschkies Aug 2, 2021
6e6a461
Document new scheduler options for frontend as well.
jeschkies Aug 2, 2021
b7cbe38
Document operation with the query scheduler.
jeschkies Aug 3, 2021
39106b8
Replace Cortex with Loki image.
jeschkies Aug 5, 2021
f42c594
Merge remote-tracking branch 'grafana/main' into karsten/document-fro…
jeschkies Aug 6, 2021
c7b914c
Remove unused Corte config.
jeschkies Aug 6, 2021
bce1b2e
Correct merger errors.
jeschkies Aug 6, 2021
b6ee19e
Clear up confusing sentence.
jeschkies Aug 6, 2021
8266cfc
Update docs/sources/operations/scalability.md
jeschkies Aug 9, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/sources/operations/scalability.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,13 @@ partitioned by role (ingester, distributor, querier) rather than a single Loki
process. Grafana Labs' [production setup](https://github.com/grafana/loki/blob/master/production/ksonnet/loki)
contains `.libsonnet` files that demonstrates configuring separate components
and scaling for resource usage.

## Separate Query Scheduler
jeschkies marked this conversation as resolved.
Show resolved Hide resolved

The Query frontend has an in-memory queue that can be moved out into a separate process similar to the [Cortex Query Scheduler](https://cortexmetrics.io/docs/operations/scaling-query-frontend/#query-scheduler). This allows running multiple query frontends.

In order to run with the Query Scheduler, the frontend needs to be passed the scheduler's address via `-frontend.scheduler-address` and the querier processes needs to be started with `-querier.scheduler-address` set to the same address. Both options can also be defined via the [configuration file](../configuration).

It is not valid to start the querier with both a configured frontend and a scheduler address.

The query scheduler process itself can be started via the `-target=query-scheduler` option of the Loki Docker image. For instance, `docker run grafana/loki:latest -config.file=/cortex/config/cortex.yaml -target=query-scheduler -server.http-listen-port=8009 -server.grpc-listen-port=9009` starts the query scheduler listening on ports `8009` and `9009`.