Skip to content

Conversation

@nnshah1
Copy link
Contributor

@nnshah1 nnshah1 commented Jul 25, 2025

Overview:

Now that we have enabled health checks natively in the worker - updating to use these instead of the place holder checks.

Details:

Where should the reviewer start?

yamls

@tedzhouhk - question for confirmation - do the prefill workers register a "generate" endpoint with the dynamo runtime? Want to make sure that is the flow.

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • closes GitHub issue: #xxx

Summary by CodeRabbit

  • Chores
    • Updated health check probes for worker services to use HTTP-based checks for improved monitoring.
    • Added startup health probes for more robust service initialization checks.
    • Introduced new environment variables to enable dynamic system features.
    • Adjusted health check timing and thresholds for better responsiveness.
    • Reduced the number of worker replicas in one deployment for resource optimization.

@copy-pr-bot
Copy link

copy-pr-bot bot commented Jul 25, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 25, 2025

Walkthrough

The Kubernetes deployment YAML files for various vLLM worker components were updated to replace shell command-based health probes with HTTP GET requests to a /health endpoint. Startup probes were added, environment variables for dynamic system behavior were introduced, and some probe timing parameters and replica counts were adjusted.

Changes

Files Change Summary
components/backends/vllm/deploy/agg.yaml
components/backends/vllm/deploy/agg_router.yaml
Switched liveness/readiness probes for VllmDecodeWorker from shell commands to HTTP GET on /health; added startup probe, new environment variables, and adjusted probe timing. In agg_router, reduced worker replicas from 2 to 1.
components/backends/vllm/deploy/disagg.yaml
components/backends/vllm/deploy/disagg_planner.yaml
components/backends/vllm/deploy/disagg_router.yaml
Updated VllmDecodeWorker and VllmPrefillWorker probes from shell commands to HTTP GET on /health; added startup probes, new environment variables, and adjusted timing/failure thresholds.

Sequence Diagram(s)

sequenceDiagram
    participant K8s as Kubernetes
    participant Worker as vLLM Worker (Decode/Prefill)
    participant HealthEP as /health Endpoint

    K8s->>Worker: Deploy container with env vars (DYN_SYSTEM_ENABLED, etc.)
    loop Health Monitoring
        K8s->>HealthEP: HTTP GET /health (liveness/readiness/startup)
        HealthEP-->>K8s: 200 OK / error
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰
Probes once ran with bash and grep,
Now HTTP checks ensure we’re prepped.
Startup probes and envs anew,
Dynamic systems coming through!
With every hop, our health’s in sight—
The YAML’s changed, and all is right.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (28)
components/backends/vllm/deploy/disagg.yaml (4)

102-108: Duplicate of the liveness-probe comment above – same parameters, same concern.


109-115: Duplicate of the readiness-probe comment above – same parameters, same concern.


124-128: Duplicate of the quoting-nit comment above.


131-136: Duplicate of the startup-probe comment above.

components/backends/vllm/deploy/disagg_router.yaml (8)

54-60: Same liveness-probe aggressiveness as noted in disagg.yaml – recommend raising failureThreshold to ≥3.


61-67: Same readiness-probe 10 min window concern.


76-80: Same quoting nit.


83-88: Same startup-probe confirmation note.


102-108: Duplicate liveness-probe concern for Prefill worker.


109-115: Duplicate readiness-probe concern for Prefill worker.


124-128: Duplicate quoting nit.


131-136: Duplicate startup-probe confirmation note.

components/backends/vllm/deploy/agg.yaml (4)

51-57: Liveness probe overly aggressive – same recommendation: increase failureThreshold (≥3) or widen period to avoid churn.


58-64: Readiness probe 10 min window – consider lowering threshold.


76-80: Quoting nit – see earlier comment.


83-88: Startup-probe confirmation – same as earlier.

components/backends/vllm/deploy/disagg_planner.yaml (8)

54-60: Liveness probe aggressiveness – same recommendation.


61-67: Readiness probe long window – same recommendation.


76-80: Quoting nit.


83-88: Startup-probe confirmation.


102-108: Duplicate liveness-probe concern for Prefill worker.


109-115: Duplicate readiness-probe concern for Prefill worker.


124-128: Duplicate quoting nit.


131-136: Duplicate startup-probe confirmation note.

components/backends/vllm/deploy/agg_router.yaml (4)

51-57: Same liveness-probe aggressiveness – raise failureThreshold.


58-64: Same readiness-probe long window – consider lowering threshold.


76-80: Quoting nit.


83-88: Startup-probe confirmation.

🧹 Nitpick comments (2)
components/backends/vllm/deploy/disagg.yaml (2)

61-67: Readiness probe may hide real issues for up to 10 min.

periodSeconds: 10 combined with failureThreshold: 60 means the worker can return unhealthy for ~10 minutes before being removed from service. That defeats fast load-balancer eviction during failures.

Recommend cutting the threshold to something like 12–18 (2–3 min) unless you have a documented need for the longer window.


76-80: YAML quoting nit – unnecessary escape noise.

The JSON string is currently double-quoted and the inner quotes are back-escaped:

value: "[\"generate\"]"

Single-quoting is simpler and easier to read:

-          value: "[\"generate\"]"
+          value: '["generate"]'

Resulting env var payload is identical.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 384e449 and a1aedbd.

📒 Files selected for processing (5)
  • components/backends/vllm/deploy/agg.yaml (2 hunks)
  • components/backends/vllm/deploy/agg_router.yaml (2 hunks)
  • components/backends/vllm/deploy/disagg.yaml (4 hunks)
  • components/backends/vllm/deploy/disagg_planner.yaml (4 hunks)
  • components/backends/vllm/deploy/disagg_router.yaml (4 hunks)
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: biswapanda
PR: ai-dynamo/dynamo#1890
File: examples/vllm/deploy/agg.yaml:63-70
Timestamp: 2025-07-14T23:01:16.218Z
Learning: In vLLM worker deployments, grep-based log checks for "VllmWorker.*has been initialized" are appropriate for readiness probes to verify worker startup, but should not be used for liveness probes which need to detect ongoing worker health.
Learnt from: julienmancuso
PR: ai-dynamo/dynamo#2012
File: deploy/cloud/helm/crds/templates/nvidia.com_dynamocomponentdeployments.yaml:1178-1180
Timestamp: 2025-07-18T16:05:05.534Z
Learning: The stopSignal field under lifecycle in DynamoComponentDeployment CRDs is autogenerated due to Kubernetes library upgrades (k8s.io/api and k8s.io/apimachinery from v0.32.3 to v0.33.1), not a manual design decision by the user.
components/backends/vllm/deploy/disagg_router.yaml (4)

Learnt from: biswapanda
PR: #1890
File: examples/vllm/deploy/agg.yaml:63-70
Timestamp: 2025-07-14T23:01:16.218Z
Learning: In vLLM worker deployments, grep-based log checks for "VllmWorker.*has been initialized" are appropriate for readiness probes to verify worker startup, but should not be used for liveness probes which need to detect ongoing worker health.

Learnt from: julienmancuso
PR: #2012
File: deploy/cloud/helm/crds/templates/nvidia.com_dynamocomponentdeployments.yaml:1178-1180
Timestamp: 2025-07-18T16:05:05.534Z
Learning: The stopSignal field under lifecycle in DynamoComponentDeployment CRDs is autogenerated due to Kubernetes library upgrades (k8s.io/api and k8s.io/apimachinery from v0.32.3 to v0.33.1), not a manual design decision by the user.

Learnt from: nnshah1
PR: #1444
File: tests/fault_tolerance/configs/agg_tp_1_dp_8.yaml:31-38
Timestamp: 2025-07-01T15:33:53.262Z
Learning: In fault tolerance test configurations, the resources section under ServiceArgs specifies resources per individual worker, not total resources for all workers. So workers: 8 with gpu: '1' means 8 workers × 1 GPU each = 8 GPUs total.

Learnt from: julienmancuso
PR: #1474
File: deploy/cloud/operator/internal/controller/dynamocomponent_controller.go:1302-1306
Timestamp: 2025-06-11T21:18:00.425Z
Learning: In the Dynamo operator, the project’s preferred security posture is to set a Pod-level PodSecurityContext with runAsUser, runAsGroup, and fsGroup all set to 1000, and then selectively override the user at the individual container level (e.g., RunAsUser: 0 for Kaniko) when root is required.

components/backends/vllm/deploy/agg.yaml (4)

Learnt from: biswapanda
PR: #1890
File: examples/vllm/deploy/agg.yaml:63-70
Timestamp: 2025-07-14T23:01:16.218Z
Learning: In vLLM worker deployments, grep-based log checks for "VllmWorker.*has been initialized" are appropriate for readiness probes to verify worker startup, but should not be used for liveness probes which need to detect ongoing worker health.

Learnt from: julienmancuso
PR: #2012
File: deploy/cloud/helm/crds/templates/nvidia.com_dynamocomponentdeployments.yaml:1178-1180
Timestamp: 2025-07-18T16:05:05.534Z
Learning: The stopSignal field under lifecycle in DynamoComponentDeployment CRDs is autogenerated due to Kubernetes library upgrades (k8s.io/api and k8s.io/apimachinery from v0.32.3 to v0.33.1), not a manual design decision by the user.

Learnt from: GuanLuo
PR: #1371
File: examples/llm/benchmarks/vllm_multinode_setup.sh:18-25
Timestamp: 2025-06-05T01:46:15.509Z
Learning: In multi-node setups with head/worker architecture, the head node typically doesn't need environment variables pointing to its own services (like NATS_SERVER, ETCD_ENDPOINTS) because local processes can access them via localhost. Only worker nodes need these environment variables to connect to the head node's external IP address.

Learnt from: julienmancuso
PR: #1474
File: deploy/cloud/operator/internal/controller/dynamocomponent_controller.go:1302-1306
Timestamp: 2025-06-11T21:18:00.425Z
Learning: In the Dynamo operator, the project’s preferred security posture is to set a Pod-level PodSecurityContext with runAsUser, runAsGroup, and fsGroup all set to 1000, and then selectively override the user at the individual container level (e.g., RunAsUser: 0 for Kaniko) when root is required.

components/backends/vllm/deploy/disagg_planner.yaml (4)

Learnt from: biswapanda
PR: #1890
File: examples/vllm/deploy/agg.yaml:63-70
Timestamp: 2025-07-14T23:01:16.218Z
Learning: In vLLM worker deployments, grep-based log checks for "VllmWorker.*has been initialized" are appropriate for readiness probes to verify worker startup, but should not be used for liveness probes which need to detect ongoing worker health.

Learnt from: julienmancuso
PR: #2012
File: deploy/cloud/helm/crds/templates/nvidia.com_dynamocomponentdeployments.yaml:1178-1180
Timestamp: 2025-07-18T16:05:05.534Z
Learning: The stopSignal field under lifecycle in DynamoComponentDeployment CRDs is autogenerated due to Kubernetes library upgrades (k8s.io/api and k8s.io/apimachinery from v0.32.3 to v0.33.1), not a manual design decision by the user.

Learnt from: nnshah1
PR: #1444
File: tests/fault_tolerance/configs/agg_tp_1_dp_8.yaml:31-38
Timestamp: 2025-07-01T15:33:53.262Z
Learning: In fault tolerance test configurations, the resources section under ServiceArgs specifies resources per individual worker, not total resources for all workers. So workers: 8 with gpu: '1' means 8 workers × 1 GPU each = 8 GPUs total.

Learnt from: julienmancuso
PR: #1474
File: deploy/cloud/operator/internal/controller/dynamocomponent_controller.go:1302-1306
Timestamp: 2025-06-11T21:18:00.425Z
Learning: In the Dynamo operator, the project’s preferred security posture is to set a Pod-level PodSecurityContext with runAsUser, runAsGroup, and fsGroup all set to 1000, and then selectively override the user at the individual container level (e.g., RunAsUser: 0 for Kaniko) when root is required.

components/backends/vllm/deploy/agg_router.yaml (3)

Learnt from: biswapanda
PR: #1890
File: examples/vllm/deploy/agg.yaml:63-70
Timestamp: 2025-07-14T23:01:16.218Z
Learning: In vLLM worker deployments, grep-based log checks for "VllmWorker.*has been initialized" are appropriate for readiness probes to verify worker startup, but should not be used for liveness probes which need to detect ongoing worker health.

Learnt from: nnshah1
PR: #1444
File: tests/fault_tolerance/configs/agg_tp_1_dp_8.yaml:31-38
Timestamp: 2025-07-01T15:33:53.262Z
Learning: In fault tolerance test configurations, the resources section under ServiceArgs specifies resources per individual worker, not total resources for all workers. So workers: 8 with gpu: '1' means 8 workers × 1 GPU each = 8 GPUs total.

Learnt from: julienmancuso
PR: #1474
File: deploy/cloud/operator/internal/controller/dynamocomponent_controller.go:1302-1306
Timestamp: 2025-06-11T21:18:00.425Z
Learning: In the Dynamo operator, the project’s preferred security posture is to set a Pod-level PodSecurityContext with runAsUser, runAsGroup, and fsGroup all set to 1000, and then selectively override the user at the individual container level (e.g., RunAsUser: 0 for Kaniko) when root is required.

components/backends/vllm/deploy/disagg.yaml (4)

Learnt from: biswapanda
PR: #1890
File: examples/vllm/deploy/agg.yaml:63-70
Timestamp: 2025-07-14T23:01:16.218Z
Learning: In vLLM worker deployments, grep-based log checks for "VllmWorker.*has been initialized" are appropriate for readiness probes to verify worker startup, but should not be used for liveness probes which need to detect ongoing worker health.

Learnt from: julienmancuso
PR: #2012
File: deploy/cloud/helm/crds/templates/nvidia.com_dynamocomponentdeployments.yaml:1178-1180
Timestamp: 2025-07-18T16:05:05.534Z
Learning: The stopSignal field under lifecycle in DynamoComponentDeployment CRDs is autogenerated due to Kubernetes library upgrades (k8s.io/api and k8s.io/apimachinery from v0.32.3 to v0.33.1), not a manual design decision by the user.

Learnt from: nnshah1
PR: #1444
File: tests/fault_tolerance/configs/agg_tp_1_dp_8.yaml:31-38
Timestamp: 2025-07-01T15:33:53.262Z
Learning: In fault tolerance test configurations, the resources section under ServiceArgs specifies resources per individual worker, not total resources for all workers. So workers: 8 with gpu: '1' means 8 workers × 1 GPU each = 8 GPUs total.

Learnt from: julienmancuso
PR: #1474
File: deploy/cloud/operator/internal/controller/dynamocomponent_controller.go:1302-1306
Timestamp: 2025-06-11T21:18:00.425Z
Learning: In the Dynamo operator, the project’s preferred security posture is to set a Pod-level PodSecurityContext with runAsUser, runAsGroup, and fsGroup all set to 1000, and then selectively override the user at the individual container level (e.g., RunAsUser: 0 for Kaniko) when root is required.

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: pre-merge-rust (.)
  • GitHub Check: pre-merge-rust (lib/runtime/examples)
  • GitHub Check: pre-merge-rust (lib/bindings/python)
  • GitHub Check: Build and Test - vllm
🔇 Additional comments (2)
components/backends/vllm/deploy/disagg.yaml (1)

83-88: Startup probe period/threshold duplicates readiness – confirm intent.

startupProbe uses the same /health endpoint with periodSeconds: 10, failureThreshold: 60 (10 min). Once the probe succeeds it is disabled, so a 10-minute window is reasonable for model load.
Just ensure:

  1. The /health endpoint returns 5xx until the model is fully loaded, otherwise readiness may succeed prematurely.
  2. Memory/CPU limits can accommodate the long warm-up without OOM-killing the pod.

No action required if both are confirmed.

components/backends/vllm/deploy/agg_router.yaml (1)

66-66: Replica reduction – validate load capacity.

Worker replicas dropped from 2 → 1. Ensure this capacity change is intentional and that the router still meets latency & throughput SLOs. If accidental, revert or adjust HPA accordingly.

@nnshah1 nnshah1 requested a review from hutm July 25, 2025 22:56
@nnshah1 nnshah1 enabled auto-merge (squash) July 25, 2025 23:28
Copy link
Contributor

@keivenchang keivenchang left a comment

Choose a reason for hiding this comment

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

I don't have a problem with the changes as long as you've tested it. I'm curious how the Runtime knows which port to bind to though.

@nnshah1 nnshah1 requested a review from keivenchang July 27, 2025 19:41
Copy link
Contributor

@keivenchang keivenchang left a comment

Choose a reason for hiding this comment

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

LGTM

@nnshah1 nnshah1 merged commit b8461b6 into main Jul 27, 2025
10 checks passed
@nnshah1 nnshah1 deleted the neelays/health-check-yaml branch July 27, 2025 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants