Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new Prometheus metric, routing_decisions_total, to track routing decisions across all router implementations. It adds logic to record these decisions with labels for server, model, algorithm, and outcome. Feedback suggests that the KvawareRouter should specifically record a fallback outcome upon a KV cache miss when a session ID is present, and that the test suite should be updated accordingly.
cf970c4 to
16df357
Compare
ruizhang0101
left a comment
There was a problem hiding this comment.
I am wondering what is the use case for this metrics? IIUC, each request will go through routing decision. So if we don't consider retry or fail, they should be the same?
16df357 to
cfd20ea
Compare
|
Hi @ruizhang0101, good to see you again. Sorry I left this hanging for so long. You’re right. In the simple case this mostly duplicates the request counter. The useful part is seeing where traffic goes and when routing falls back or retries. I checked current main and this PR is too stale to revive as is, so I’d rather rework it around those cases. What do you think? |
cfd20ea to
3bbe398
Compare
|
Reworked this around the gap you pointed out. The counter now records bounded |
|
@ruizhang0101 any feedback on the revised routing counter? It now covers routing choices and fallbacks rather than request volume. |
|
#1079 is waiting for review too. @Shaoting-Feng could you take a look at the routing counter changes here? |
|
The routing counter changes here and the resource requests and limits in #1079 are still awaiting review. @YuhanLiu11 could you look at them? |
3bbe398 to
f70aa03
Compare
Signed-off-by: Michael Basov <124149774+banlor@users.noreply.github.com>
f70aa03 to
c1c3803
Compare
What this changes
The request counter shows request volume, but it cannot explain which routing path selected a backend. This redesign adds a routing-decision counter for primary choices, fallbacks, retries, and prefill/decode selections.
RoutingDecisionstring subtype.algorithm,decision, andreason.Cardinality
All three labels use explicit allowlists: 9 algorithms × 6 decisions × 10 reasons, for at most 540 label combinations per registry. Backend IDs, URLs, model names, and request metadata are not labels.
Tests
main.Closes #474