← Back to Pull requests

standalone: route fail-open traffic to model servers when EPP is unreachable #3433

Closed
unknown closed this pull request without merging on Oct 14, 2026 20:43 UTC
View on GitHub
unknown unknown commented on Oct 14, 2026 17:27 UTC
Author

What type of PR is this?
/kind bug

What this PR does / why we need it:

With router.proxy.failOpen: true, the standalone Envoy proxy skips ext_proc when EPP is unreachable. The only route goes to original_destination_cluster, which needs the x-gateway-destination-endpoint header that EPP sets. With EPP down, nothing sets it, so these requests never reach a model server and fail-open does not work in standalone mode (documented in #3427).

This PR adds a fallback route, rendered only for the standalone chart with Envoy and failOpen: true (the default):

  • Routes: original_destination_cluster now matches only when x-gateway-destination-endpoint is present. A second catch-all route sends everything else to a new inference_pool_fallback cluster. EPP already sets ClearRouteCache: true with its header mutation, so requests it schedules re-match to the first route. No EPP change is needed.

  • Cluster: inference_pool_fallback is a STRICT_DNS / LEAST_REQUEST cluster. It resolves a new headless Service, <release>-epp-model-servers, which selects router.modelServers.matchLabels on the first router.modelServers.targetPorts entry. A headless Service publishes only ready pods.

  • Header strip: an HCM early_header_mutation_extensions entry removes any client-supplied x-gateway-destination-endpoint before route selection, so only EPP picks the endpoint. This is rendered in every Envoy config, fallback or not. It uses early mutation rather than the header_mutation HTTP filter so the route cache is not computed from the client's header.

  • Fallback header removal: the fallback route removes client-supplied internal routing headers (x-llm-d-prefiller-host-port, x-llm-d-encoder-hosts-ports, x-data-parallel-host-port, x-llm-d-kv-cache-source-host-port and their legacy aliases) and x-llm-d-pin-host-port, which EPP removes on the scheduled route. They are removed on the route, after ext_proc, because EPP screeners read x-llm-d-pin-host-port.

  • Docs: docs/operations.md and config/charts/README.md now describe the fallback. They also correct the documented failOpen default: the standalone values.yaml sets true for both modes, not false for sidecar.
  • Behavior with failOpen: false, with Agentgateway, and in the gateway chart is unchanged, except that the header strip applies to every Envoy config.

    Follow-ups / decisions for reviewers:

  • Only the first targetPorts entry is used. Data-parallel deployments with several ports get fallback traffic on rank 0's port only.

  • Fallback routing is unoptimized: no prefix-cache affinity, load-aware scoring, or flow control. It is visible in Envoy's cluster.inference_pool_fallback.* stats.

  • Sidecar mode also gets the fallback because failOpen defaults to true there. It only helps if the EPP container is down while the Envoy container is still up.

  • The headless Service selects router.modelServers.matchLabels. In P/D deployments that also matches prefill pods, so some fallback requests go straight to prefill servers. vLLM kv_both prefill pods serve them; SGLang prefill servers in disaggregation mode likely reject requests without bootstrap fields.

  • Fallback requests skip EPP, so model-name rewrites (InferenceModelRewrite) do not apply, the same as Gateway FailOpen.
  • Which issue(s) this PR fixes:
    Fixes #3432

    Release note _(write NONE if no user-facing change)_:
    ``release-note
    llm-d-router-standalone: with router.proxy.failOpen=true (default) and the Envoy proxy, requests are now load-balanced across the model servers through a new headless Service (<release>-epp-model-servers) when EPP is unreachable. Previously they could not be routed. Envoy now also removes client-supplied x-gateway-destination-endpoint headers, and fallback requests have client-supplied internal routing headers removed.
    `

    Testing

  • make verify-helm-charts passes. New assertions in hack/verify-helm.sh cover:

  • - service mode renders the fallback route, the header-gated route, the cluster FQDN, the headless Service and the header strip;
    -
    failOpen=false renders no fallback but keeps the strip;
    - a custom
    targetPorts value is used;
    - Agentgateway renders no fallback Service.
  • envoy --mode validate (envoy v1.33.2, the chart's image) passes on rendered configs for service, sidecar, failOpen=false and priority routing.

  • Local end-to-end run with the rendered service-mode config in Envoy v1.33.2. Two fake model servers (pool-fallback stands in for the headless Service, epp-picked is the endpoint the fake EPP picks), plus a fake ext_proc server that sets the destination header with ClearRouteCache:
  • | Scenario | Request | main | This PR |
    |---|---|---|---|
    | EPP unreachable | GET / POST | 503
    no healthy upstream | 200 from pool-fallback |
    | EPP unreachable | client sets destination header | — | 200 from
    pool-fallback, header removed |
    | EPP up | GET / POST | — | 200 from
    epp-picked |
    | EPP up | client sets destination header | — | 200 from
    epp-picked`; EPP never sees the client header |

    Diff: 639 lines (+479 / -160) across 7 files Reviewer: ahg-g Review duration: 195m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 639 lines diff across 7 files
    0.50
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.387
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3433"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 50.4% (MEDIUM) · Higher = larger blast radius
    50.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 19.9% · Safe to merge
    19.9%