Skip to content

[Feat][Router] Add RFC for request migration on engine failure (#855) - #1202

Open
punitvara wants to merge 3 commits into
vllm-project:mainfrom
punitvara:rfc/request-migration
Open

punitvara wants to merge 3 commits into
vllm-project:mainfrom
punitvara:rfc/request-migration

Conversation

@punitvara

Copy link
Copy Markdown
Contributor

Refs #855

Summary

RFC for the roadmap item "(P0) Request migration when the vLLM instance fails" (#855). This PR is proposal-only.

Today the router can only recover from an engine failure that happens before any response bytes are sent. After streaming starts, an engine failure cuts the client's stream, a backend 5xx is passed through instead of retried, and a hung engine is never detected (ClientTimeout(total=None)).

What is proposed

  • Phase 1a, safe retries: retry on another engine for connection errors and backend 5xx before the first byte, full retry of non-streaming requests, an inter-chunk stall timeout, passive ejection of failing engines, and metrics.
  • Phase 1b, mid-stream migration: an SSE-frame-aware proxy tracks the text already delivered; on engine failure the router continues on a healthy engine (prompt + delivered text for completions, continue_final_message for chat) and rewrites ids and usage so the client sees one coherent stream.
  • Not migratable in Phase 1 (fail as today, with a metric): seeded requests, n>1, structured output, tool calls.
  • Later phases: exact resume from token ids, priority boost after router-side queuing lands, planned-drain migration.
  • Everything is opt-in and off by default.

Open questions (also listed in the RFC)

  • Does the roadmap item include planned drains, or only unplanned failures?
  • vLLM support for continue_final_message and token-id resume on the pinned versions.
  • Should a backend 500 before the first byte be retried by default?

Related: #996 (priority routing, a migrated request keeps its priority), #876 (router-side queuing, re-admission is a follow-up).

  • Sign-off your commit by using -s when doing git commit
  • Classify the PR ([Feat])

🤖 Generated with Claude Code

Propose safe retries before the first byte and transparent mid-stream
migration of streaming requests when a vLLM engine fails.

Refs vllm-project#855

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Signed-off-by: Punit Vara <[email protected]>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a design proposal to make the router resilient to vLLM engine failures through safe retries and mid-stream migration. The review feedback suggests several improvements to the proposal: implementing safeguards for passive health ejection to prevent cascading failures, resolving an inconsistency between token and character limits in the text buffer, documenting the impact of migration on stateful sampling parameters like presence and frequency penalties, and adopting a concrete strategy for approximate usage accounting in Phase 1.

Comment thread proposals/request-migration.md Resolved
Comment thread proposals/request-migration.md Resolved
Comment thread proposals/request-migration.md Resolved
Comment thread proposals/request-migration.md Resolved
punitvara and others added 2 commits November 10, 2026 16:01
- Add a max-ejected-fraction safeguard to passive ejection
- Bound the migration buffer by delivered tokens, not characters
- Document penalty history reset and exclude penalized requests in Phase 1
- Adopt a concrete usage accounting scheme for Phase 1

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Signed-off-by: Punit Vara <[email protected]>
…m-project#939

- Add related work (vllm-project#939, vllm-project#984, vllm-project#1164, vllm-project#1115, vllm-project#876)
- Drop --retry-on-backend-5xx and request_retries_total; reuse vllm-project#939
- Re-scope Phase 1a to stall detection and passive ejection
- Require new settings in the dynamic config
- Replace line-number reference with function names

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Signed-off-by: Punit Vara <[email protected]>
@punitvara

Copy link
Copy Markdown
Contributor Author

@ruizhang0101 Can you please review this proposal ?

@punitvara

Copy link
Copy Markdown
Contributor Author

@ruizhang0101 Can you please review this ?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant