-
Notifications
You must be signed in to change notification settings - Fork 524
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
autoscaling: add querier predictive scaling #7775
autoscaling: add querier predictive scaling #7775
Conversation
autoscaling_querier_predictive_scaling_enabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo typo below.
Is it worth making the lookback (currently 7d) and range (currently 30m) configurable? I could imagine different Mimir clusters could have different query patterns.
b17cc1a
to
f550086
Compare
Added in a4ba23b |
thanks for the review and sorry for the numerous typos 🙈 can you take another pass @charleskorn? |
operations/helm/charts/mimir-distributed/templates/querier/querier-so.yaml
Outdated
Show resolved
Hide resolved
This PR upstreams a change that we have been trialing at GL. ### Problem Some workloads have a very uneven distribution of queries. Some of the causes of this can be external alerting systems and reporting tools which run batch jobs once a day. This results in an influx of queries at fairly regular intervals (~24h). Autoscaling can only respond so fast to incoming queries. In practice, it takes anywhere between 2 and 7 minutes to respond to queries and trigger a scaling event. As a result Mimir's query queues fill up and Mimir start returning HTTP 429 to new queries until queriers have had the time to scale out and accommodate the added load. ### Solution Scale preemptively. Automated workloads are also highly predictive. This PR uses the value of the inflight queries at the same time last week (6d23h30m instead of 7d) to prepare for periodic queries. ### Results We've seen HTTP 429 responses decrease significantly on a weekly basis: between 66% and 95% ### Side effects There are a lot of false-positive scaling events. As a result of this we've seen querier cost increase between 20% and 50%. Given that querier cost is usually 1-2% of the cell's TCO, this is somewhat acceptable for a better QoS. Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Co-authored-by: Charles Korn <charleskorn@users.noreply.github.com>
Co-authored-by: Charles Korn <charleskorn@users.noreply.github.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
44b3e3e
to
4db5b1d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Have you considered enabling it in operations/mimir-tests/test-autoscaling.jsonnet
?
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
This PR upstreams a change that we have been trialing at GL.
Problem
Some workloads have a very uneven distribution of queries. Some of the causes of this can be external alerting systems and reporting tools which run batch jobs once a day.
This results in an influx of queries at fairly regular intervals (~24h). Autoscaling can only respond so fast to incoming queries. In practice, it takes anywhere between 2 and 7 minutes to respond to queries and trigger a scaling event. As a result Mimir's query queues fill up and Mimir start returning HTTP 429 to new queries until queriers have had the time to scale out and accommodate the added load.
Solution
Scale preemptively. Automated workloads are also highly predictive. This PR uses the value of the inflight queries at the same time last week (6d23h30m instead of 7d) to prepare for periodic queries.
Results
We've seen HTTP 429 responses decrease significantly on a weekly basis: between 66% and 95%
Side effects
There are a lot of false-positive scaling events. As a result of this we've seen querier cost increase between 20% and 50%. Given that querier cost is usually 1-2% of the cell's TCO, this is somewhat acceptable for a better QoS.
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.