Skip to content

Conversation

@BenjaminBraunDev
Copy link
Contributor

@BenjaminBraunDev BenjaminBraunDev commented Nov 7, 2025

This PR contains the (now combined) stages 2/3 and 3/3 for adding in the latency prediction functionality to EPP.

New features:

  1. New -enable-latency-predictor flag in EPP arg to inform it that sidecars are present and to register slo routing plugins.
  2. Requests now support latency SLOs in their header (x-slo-ttft-ms and x-slo-tpot-ms) and a boolean for whether to use the SLO routing scheduling profile with slo scoring (x-prediction-based-scheduling). If false, use the default profile and just track and train for future requests.
  3. Tracks requests and their latencies and sends data back to training sidecar for processing.
  4. Scores based on latencies and headroom.
  5. Adds (back) the totalRunningRequestsMetric prometheus metric from vLLM, which was removed for being unused in the past, but is now a feature of our latency prediction model.

Fixes #1323

Does this PR introduce a user-facing change?:

Yes:
EPP has a new runtime/deployment argument: `-enable-latency-predictor`

When enabled EPP, will register and support the new SLO routing plugins and sidecars. With this flag, EPP will assume the predictor and training sidecars also exist in its same container.

When latency prediction is enabled for EPP, requests support 3 new headers:
- `x-slo-ttft-ms` is a float for the desired "Time To First Token" SLO
- `x-slo-tpot-ms` is a float for the desired average "Time Per Output Token" SLO
- `x-prediction-based-scheduling` is a boolean for whether to route this request with the default scheduling profile or with the slo-aware scheduling profile

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: BenjaminBraunDev
Once this PR has been reviewed and has the lgtm label, please assign kfswain for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@netlify
Copy link

netlify bot commented Nov 7, 2025

Deploy Preview for gateway-api-inference-extension ready!

Name Link
🔨 Latest commit b2a7d45
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/6912572af2d16600077f1bba
😎 Deploy Preview https://deploy-preview-1839--gateway-api-inference-extension.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 7, 2025
@k8s-ci-robot k8s-ci-robot requested review from ahg-g and elevran November 7, 2025 23:56
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Nov 7, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @BenjaminBraunDev. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] SLO-Aware Routing with Latency Prediction

2 participants