-
Notifications
You must be signed in to change notification settings - Fork 838
Query frontend readiness #2733
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
Merged
pstibrany
merged 23 commits into
cortexproject:master
from
joe-elliott:query-frontend-readiness
Jul 1, 2020
Merged
Query frontend readiness #2733
Changes from 19 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
be7218d
Added basic functionality
joe-elliott de2a613
scalable frontend proposal cleanup
joe-elliott 3fdff32
Added readyForRequests test
joe-elliott a807302
Added frontend ready tests
joe-elliott df88d96
Added integration tests
joe-elliott d31f22d
Return better http body
joe-elliott 42cafa0
Added PR to frontend doc
joe-elliott 1309aba
Added scalable frontend docs
joe-elliott 3607204
Added entry to api.md
joe-elliott 67dfcfe
Update docs/apis.md
joe-elliott 8450c98
Merge branch 'master' into query-frontend-readiness
joe-elliott 158f424
/query-frontend/ready => /ready
joe-elliott 65af481
Merge branch 'master' into query-frontend-readiness
joe-elliott ecee207
Update CHANGELOG.md
joe-elliott 9d69ad3
Cleaned up tests
joe-elliott e8a3557
Reworked integration test to work with new /ready mechanics
joe-elliott c5c2d32
Merge branch 'master' into query-frontend-readiness
joe-elliott 7a2c47f
Corrected flag
joe-elliott 685e82b
Added comment on latency
joe-elliott ade7543
removed unnecessary test method
joe-elliott abfc7e2
Swapped to uber atomic
joe-elliott 79d5742
Improved return body
joe-elliott 6cf0789
warn => info
joe-elliott File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| --- | ||
| title: "Scaling the Query Frontend" | ||
| linkTitle: "Scaling the Query Frontend" | ||
| weight: 5 | ||
| slug: scaling-query-frontend | ||
| --- | ||
|
|
||
| Historically scaling the Cortex query frontend has [posed some challenges](https://cortexmetrics.io/docs/proposals/scalable-query-frontend/). This document aims to detail how to use some of the added configuration parameters to correctly scale the frontend. Note that these instructions apply in both the HA single binary scenario or microservices mode. | ||
|
|
||
| ## DNS Configuration / Readiness | ||
|
|
||
| When a new frontend is first created on scale up it will not immediately have queriers attached to it. The existing endpoint `/ready` was updated to only return http 200 when the query frontend was ready to serve queries. Make sure to configure this endpoint as a healthcheck in your load balancer. Otherwise a query frontend scale up event might result in failed queries or high latency for a bit while queriers attach. | ||
|
|
||
| ## Querier Max Concurrency | ||
|
|
||
| Make sure to configure the querier frontend worker to match max concurrency. This will allow the operator to freely scale the frontend up and down without impacting the amount of work an individual querier is attempting to perform. More details [here](https://cortexmetrics.io/docs/proposals/scalable-query-frontend/#dynamic-querier-concurrency). | ||
|
|
||
| ### Example Configuration | ||
|
|
||
| **CLI** | ||
| ``` | ||
| -querier.worker-match-max-concurrent=true | ||
| ``` | ||
|
|
||
| **Config File** | ||
| ```yaml | ||
| frontend_worker: | ||
| match_max_concurrent: true | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.