middlware to track server load #18613
Draft
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.
an issue was found where load_aware_call could not handle timed out requests. Migrating to use middleware instead while keeping it behind the enable-server-load-tracking flag to avoid any potential performance impact.
with the middleware:
Serving Benchmark Result
Successful requests: 10000
Benchmark duration (s): 166.86
Total input tokens: 1000000
Total generated tokens: 1253399
Request throughput (req/s): 59.93
Output token throughput (tok/s): 7511.73
Total Token throughput (tok/s): 13504.82
---------------Time to First Token----------------
Mean TTFT (ms): 37.11
Median TTFT (ms): 26.30
P99 TTFT (ms): 219.72
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms): 13.06
Median TPOT (ms): 13.05
P99 TPOT (ms): 13.63
---------------Inter-token Latency----------------
Mean ITL (ms): 13.06
Median ITL (ms): 12.72
P99 ITL (ms): 18.98
without the middleware:
Serving Benchmark Result
Successful requests: 10000
Benchmark duration (s): 170.14
Total input tokens: 1000000
Total generated tokens: 1252755
Request throughput (req/s): 58.77
Output token throughput (tok/s): 7363.02
Total Token throughput (tok/s): 13240.48
---------------Time to First Token----------------
Mean TTFT (ms): 36.96
Median TTFT (ms): 27.08
P99 TTFT (ms): 291.95
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms): 13.33
Median TPOT (ms): 13.35
P99 TPOT (ms): 13.76
---------------Inter-token Latency----------------
Mean ITL (ms): 13.34
Median ITL (ms): 12.93
P99 ITL (ms): 20.07