Skip to content

Conversation

@nealvaidya
Copy link
Contributor

@nealvaidya nealvaidya commented Jul 28, 2025

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive guide for deploying and managing a multi-node Dynamo setup with KV-aware routing, including setup instructions, testing, monitoring, troubleshooting, advanced configuration, and cleanup procedures.

@nealvaidya nealvaidya marked this pull request as ready for review July 28, 2025 23:48
@nealvaidya nealvaidya requested review from a team, nnshah1 and whoisj as code owners July 28, 2025 23:48
@nealvaidya nealvaidya requested a review from ishandhanani July 28, 2025 23:48
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 28, 2025

Walkthrough

A new README file has been added under examples/basics/multinode/, providing a detailed guide for deploying and managing a multi-node Dynamo system with KV-aware routing. The documentation covers setup, configuration, testing, monitoring, troubleshooting, advanced options, and cleanup for distributed LLM inference.

Changes

Cohort / File(s) Change Summary
New Multi-Node Example Documentation
examples/basics/multinode/README.md
Added a comprehensive README with step-by-step instructions, architecture overview, configuration, and troubleshooting for deploying a multi-node Dynamo system with KV-aware routing.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • feat: add kv router to sglang #1605: Implements KV router integration and related code changes in the SGLang frontend and worker components, directly related to the feature area described in the new README.

Poem

In the warren, nodes align,
Routing keys with paths divine.
Frontends, workers, caches share,
Tokens leap from here to there.
With this guide, deploy with glee—
Distributed dreams, now rabbit reality! 🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


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: 2

♻️ Duplicate comments (1)
examples/basics/multinode/README.md (1)

361-369: Second fenced log block also missing language

-```
+```text
[DEBUG] KV overlap scores: {prefill-worker-1: 15 blocks, prefill-worker-2: 8 blocks}
...
🧹 Nitpick comments (2)
examples/basics/multinode/README.md (2)

111-118: Environment-variable guidance contradicts prior best practice

You instruct setting ETCD_ENDPOINTS and NATS_SERVER on all nodes, but earlier learnings show the head/frontend node can rely on localhost and shouldn’t need these variables. Over-exporting encourages copy-paste mistakes and needlessly pollutes envs.

Recommend clarifying:

# On worker nodes only (frontend/head can omit):
export ETCD_ENDPOINTS=http://<INFRA_NODE_IP>:2379
export NATS_SERVER=nats://<INFRA_NODE_IP>:4222

…and adding a short note referencing the head/worker distinction.


322-329: Add language identifier to fenced log snippet (markdownlint MD040)

-```
+```text
[DEBUG] KV overlap scores: {worker-1: 15 blocks, worker-2: 8 blocks}
...
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between cfc6178 and 1366d61.

📒 Files selected for processing (1)
  • examples/basics/multinode/README.md (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: fsaady
PR: ai-dynamo/dynamo#1730
File: examples/sglang/slurm_jobs/job_script_template.j2:59-59
Timestamp: 2025-07-02T13:20:28.800Z
Learning: In the SLURM job script template at examples/sglang/slurm_jobs/job_script_template.j2, the `--total_nodes` parameter represents the total nodes per worker type (prefill or decode), not the total nodes in the entire cluster. Each worker type needs to know its own group size for distributed coordination.
examples/basics/multinode/README.md (2)

Learnt from: fsaady
PR: #1730
File: examples/sglang/slurm_jobs/scripts/worker_setup.py:230-244
Timestamp: 2025-07-03T10:14:30.570Z
Learning: In examples/sglang/slurm_jobs/scripts/worker_setup.py, background processes (like nats-server, etcd) are intentionally left running even if later processes fail. This design choice allows users to manually connect to nodes and debug issues without having to restart the entire SLURM job from scratch, providing operational flexibility for troubleshooting in cluster environments.

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.

🪛 markdownlint-cli2 (0.17.2)
examples/basics/multinode/README.md

324-324: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


363-363: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

Copy link
Contributor

@ishandhanani ishandhanani left a comment

Choose a reason for hiding this comment

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

Approving to unblock but please address changes

Copy link
Collaborator

@whoisj whoisj left a comment

Choose a reason for hiding this comment

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

LGTM

@nealvaidya nealvaidya enabled auto-merge (squash) July 29, 2025 17:43
@nealvaidya nealvaidya merged commit ca5b681 into main Jul 29, 2025
8 of 9 checks passed
@nealvaidya nealvaidya deleted the nealv/multinode_example branch July 29, 2025 18:40
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.

5 participants