feat: optimize router config guidelines for agentic workloads#1958
feat: optimize router config guidelines for agentic workloads#1958Madhumasa84 wants to merge 1 commit into
Conversation
|
🚨 Unsigned commits detected! Please sign your commits. For instructions on how to set up GPG/SSH signing and verify your commits, please see GitHub Documentation. |
Signed-off-by: Madhusudhanan <smkp84@gmail.com>
|
Thanks for adding this. Can you explain more on your benchmark setup? For example, what model or model server and hardware you deployed the stack on and can you also compare the new configurations with the existing one? |
|
Thanks for the review, @liu-cong! Here are the details of the benchmark setup and a comparison between the standard routing configuration and the new optimized one. Benchmark Setup
Configuration ComparisonThe Baseline configuration used standard routing without length-aware prefix caching or session affinity. The Optimized configuration includes:
SummaryBy keeping the rapidly diverging chat history sticky to the original pod via session affinity, while allowing shorter new sessions to migrate using the length-aware prefix cache, the router successfully processed the agentic traces while significantly improving tail (P90) latency by nearly 30%. The optimized configuration avoids unnecessary and expensive migration costs for longer-running sessions.
Let me know if you need any additional details as well
|
|
I think we require more extensive benchmarking before introducing a change to the default deployments. This benchmark does not really reflect the agentic-workloads / deployments. Though the intuition is right, and we're working in these directions. /hold |
|
Thanks for the review and explanation, @vMaroon. I completely agree with the My local benchmark was just meant as a functional proof-of-concept to validate the routing logic. You are absolutely right that it doesn't reflect the long context windows and heavy concurrency of a true production agentic deployment. Since I don't currently have access to a multi-node GPU cluster, I'm unable to run a high-concurrency stress test on a larger model to provide that data right now. |


What type of PR is this?
/kind feature
/kind documentation
What this PR does / why we need it
Agentic workloads have different routing characteristics compared to traditional stateless inference. They benefit significantly from long-session stickiness and session affinity because requests within the same session frequently share context but rarely share prefixes across different sessions beyond the initial system prompt.
This PR improves the documentation and recommendations for configuring the router for agentic workloads by:
Evaluating Session Affinity
sessionaffinity/README.md.Documenting Prefix Match Length Awareness
prefix/README.mdto recommend enablingprefixMatchLengthawareness with:matchLengthWeight: 0.8matchLengthScaleTokens: 16000Benchmarking Agentic Traces
inference-perf'sotel_trace_replay.Well-Lit Path
agentic-servingguide are being submitted separately in the companion PR to thellm-drepository.Reference:
Benchmark Results
Ran the OTel trace replay (
simple_chain.json) against the optimized gateway.Throughput
Latency
Request Latency
Token Generation (Normalized TPOT)
Session Summary
Which issue(s) this PR fixes
Fixes #1867
Release note