Skip to content

Enable first level of support for vLLM V1 Sleep & Wake_up Mode #441

Merged
YuhanLiu11 merged 1 commit into
vllm-project:mainfrom
dumb0002:check_sleep_status
Jun 10, 2025
Merged

Enable first level of support for vLLM V1 Sleep & Wake_up Mode #441
YuhanLiu11 merged 1 commit into
vllm-project:mainfrom
dumb0002:check_sleep_status

Conversation

@dumb0002

@dumb0002 dumb0002 commented May 20, 2025

Copy link
Copy Markdown
Contributor

This PR enables the Production Stack router to support serving request for vLLM engines with the flag --enable-sleep-mode set. The router does not forward requests to a sleeping engine. To achieve this, the router service discovery and request processing features were extended to check if an engine instance is sleeping or wake_up and ready to process requests.

Second PR for FIX to issue #391

BEFORE SUBMITTING, PLEASE READ THE CHECKLIST BELOW AND FILL IN THE DESCRIPTION ABOVE


  • Make sure the code changes pass the pre-commit checks.
  • Sign-off your commit by using -s when doing git commit
  • Try to classify PRs for easy understanding of the type of changes, such as [Bugfix], [Feat], and [CI].
Detailed Checklist (Click to Expand)

Thank you for your contribution to production-stack! Before submitting the pull request, please ensure the PR meets the following criteria. This helps us maintain the code quality and improve the efficiency of the review process.

PR Title and Classification

Please try to classify PRs for easy understanding of the type of changes. The PR title is prefixed appropriately to indicate the type of change. Please use one of the following:

  • [Bugfix] for bug fixes.
  • [CI/Build] for build or continuous integration improvements.
  • [Doc] for documentation fixes and improvements.
  • [Feat] for new features in the cluster (e.g., autoscaling, disaggregated prefill, etc.).
  • [Router] for changes to the vllm_router (e.g., routing algorithm, router observability, etc.).
  • [Misc] for PRs that do not fit the above categories. Please use this sparingly.

Note: If the PR spans more than one category, please include all relevant prefixes.

Code Quality

The PR need to meet the following code quality standards:

  • Pass all linter checks. Please use pre-commit to format your code. See README.md for installation.
  • The code need to be well-documented to ensure future contributors can easily understand the code.
  • Please include sufficient tests to ensure the change is stay correct and robust. This includes both unit tests and integration tests.

DCO and Signed-off-by

When contributing changes to this project, you must agree to the DCO. Commits must include a Signed-off-by: header which certifies agreement with the terms of the DCO.

Using -s with git commit will automatically add this header.

What to Expect for the Reviews

We aim to address all PRs in a timely manner. If no one reviews your PR within 5 days, please @-mention one of YuhanLiu11
, Shaoting-Feng or ApostaC.

@dumb0002

Copy link
Copy Markdown
Contributor Author

FYI, I see this PR is failing one of the tests - I checked it but I don't understand the root-cause - not sure if it's related with changes proposed in this PR. I see the following error from the test logs:

Run bash .github/port-forward.sh curl-05-secure-vllm
Waiting for all llmstack pods to be in Running state...
error: timed out waiting for the condition on pods/vllm-deployment-router-5c6[4](https://github.com/vllm-project/production-stack/actions/runs/15146370551/job/42582906916?pr=441#step:9:5)569f4b-b62p5
Error from server (BadRequest): container "router-container" in pod "vllm-deployment-router-[5](https://github.com/vllm-project/production-stack/actions/runs/15146370551/job/42582906916?pr=441#step:9:6)c64569f4b-b62p5" is waiting to start: trying and failing to pull image
Not all pods are ready yet. Checking again in 5 seconds...
Not all pods are ready yet. Checking again in 5 seconds...
Not all pods are ready yet. Checking again in 5 seconds...
Error: The action 'Validate the installation and send query to the stack' has timed out after 2 minutes.

@dumb0002 dumb0002 force-pushed the check_sleep_status branch 3 times, most recently from 0b6a679 to 7dc6a95 Compare June 2, 2025 20:38
added_timestamp=int(time.time()),
Id=str(uuid.uuid5(uuid.NAMESPACE_DNS, engine_name)),
model_label=model_label,
sleep=self._get_engine_sleep_status(engine_ip),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

High level question: Should we watch the engine stats continuously instead of only calling this _get_engine_sleep_status once when it's added?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The function _watch_engines timeouts every 30 seconds. Hence, I am taking advantage of this mechanism to continuously call _get_engine_sleep_status at the watch timeout interval.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Also, this is first PR to support sleep & wake_up mode. I will submit a second PR to complete the design outlined in this issue # 391

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Here is the second PR that I referred in the comment above: #498

Signed-off-by: Braulio Dumba <Braulio.Dumba@ibm.com>
@dumb0002 dumb0002 force-pushed the check_sleep_status branch from 7dc6a95 to ff50fc4 Compare June 10, 2025 05:43

@YuhanLiu11 YuhanLiu11 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM! Also tried on static service discovery and it works well on my side.

@YuhanLiu11 YuhanLiu11 merged commit a261ca1 into vllm-project:main Jun 10, 2025
11 checks passed
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

JustinDuy pushed a commit to JustinDuy/production-stack-1 that referenced this pull request Jun 13, 2025
…oject#441)

Signed-off-by: Braulio Dumba <Braulio.Dumba@ibm.com>
Co-authored-by: Braulio Dumba <Braulio.Dumba@ibm.com>
davidgao7 pushed a commit to davidgao7/production-stack that referenced this pull request Jun 26, 2025
…oject#441)

Signed-off-by: Braulio Dumba <Braulio.Dumba@ibm.com>
Co-authored-by: Braulio Dumba <Braulio.Dumba@ibm.com>
Signed-off-by: David Gao <davidgao313@outlook.com>
Senne-Mennes pushed a commit to Senne-Mennes/production-stack that referenced this pull request Oct 22, 2025
…oject#441)

Signed-off-by: Braulio Dumba <Braulio.Dumba@ibm.com>
Co-authored-by: Braulio Dumba <Braulio.Dumba@ibm.com>
Signed-off-by: senne.mennes@capgemini.com <senne.mennes@capgemini.com>
emanuelecassese pushed a commit to emanuelecassese/production-stack that referenced this pull request Jan 30, 2026
…oject#441)

Signed-off-by: Braulio Dumba <Braulio.Dumba@ibm.com>
Co-authored-by: Braulio Dumba <Braulio.Dumba@ibm.com>
BadLord1st pushed a commit to BadLord1st/vllm-production-stack that referenced this pull request Feb 1, 2026
…oject#441)

Signed-off-by: Braulio Dumba <Braulio.Dumba@ibm.com>
Co-authored-by: Braulio Dumba <Braulio.Dumba@ibm.com>
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.

2 participants