Make adaptive routing variables runtime adjustable#18807
Open
timothy-e wants to merge 1 commit into
Open
Conversation
cc stripe-private-oss-forks/pinot-reviewers Makes three adaptive routing parameters adjustable at runtime via cluster config changes: - `hybrid.score.exponent` — the exponent used in the hybrid score formula `(O+A+B)^N * C` - `ewma.alpha` — the smoothing factor for exponential moving averages (latency and in-flight requests) - `autodecay.window.ms` — the time threshold after which EMA values auto-decay toward zero When any of these configs change, the new value is propagated to all existing `ServerRoutingStatsEntry` instances in both the SSE and MSE stats maps. New entries created after the change also use the updated values. Make it easier to tune adaptive routing! [Deployed to rad-rose QA](https://amp.qa.corp.stripe.com/deploy/qa-deploy1.pdx.deploy.stripe.net%2Fdeploy_GVXCm9r7RJSy6QxZOK2XmA). ``` curl -X POST localhost:9000/cluster/configs -H "Content-Type: application/json" -d '{"pinot.broker.adaptive.server.selector.ewma.alpha": "0"}' {"status":"Updated cluster config."} ``` <img width="741" alt="Screenshot 2026-06-03 at 4 37 32 pm" src="https://git.corp.stripe.com/user-attachments/assets/643a0a16-b182-42e5-a04d-48fb2609c27d" /> ``` curl -X POST localhost:9000/cluster/configs -H "Content-Type: application/json" -d '{"pinot.broker.adaptive.server.selector.hybrid.score.exponent": "0"}' {"status":"Updated cluster config."} ``` Harder to prove it worked, but we do see `Updated EWMA alpha to 0.0 and propagated to all entries.` in logscale ``` curl -X POST localhost:9000/cluster/configs -H "Content-Type: application/json" -d '{"pinot.broker.adaptive.server.selector.autodecay.window.ms": "100000"}' {"status":"Updated cluster config."} ``` <img width="738" alt="Screenshot 2026-06-03 at 4 48 02 pm" src="https://git.corp.stripe.com/user-attachments/assets/b2e06eef-b0c0-45cf-af61-38bb3639b009" /> We can see the stats stay high for a lot longer before they drop down. Stripe-Original-Repo: stripe-private-oss-forks/pinot Stripe-Monotonic-Timestamp: v2/2026-06-11T17:05:04Z/0 Stripe-Original-PR: https://git.corp.stripe.com/stripe-private-oss-forks/pinot/pull/669
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #18807 +/- ##
============================================
+ Coverage 64.78% 64.81% +0.03%
Complexity 1309 1309
============================================
Files 3381 3386 +5
Lines 209967 210247 +280
Branches 32891 32933 +42
============================================
+ Hits 136020 136269 +249
- Misses 62979 63002 +23
- Partials 10968 10976 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Makes three adaptive routing parameters adjustable at runtime via cluster config changes:
hybrid.score.exponent— the exponent used in the hybrid score formula(O+A+B)^N * Cewma.alpha— the smoothing factor for exponential moving averages (latency and in-flight requests)autodecay.window.ms— the time threshold after which EMA values auto-decay toward zeroWhen any of these configs change, the new value is propagated to all existing
ServerRoutingStatsEntryinstances in both the SSE and MSE stats maps. New entries created after the change also use the updated values.Motivation
Make it easier to tune adaptive routing!
Testing
We've deployed this internally and used it to tune all three variables.
The testing we did before merging internally:
Deployed to a QA cluster.
Harder to prove it worked, but we do see
Updated EWMA alpha to 0.0 and propagated to all entries.in the logs.We can see the stats stay high for a lot longer before they drop down.