Skip to content

Conversation

@harshit-anyscale
Copy link
Contributor

@harshit-anyscale harshit-anyscale commented Oct 14, 2025

to be merged after #57554

Signed-off-by: harshit <harshit@anyscale.com>
@harshit-anyscale harshit-anyscale requested review from a team as code owners October 14, 2025 07:54
@harshit-anyscale harshit-anyscale self-assigned this Oct 14, 2025
@harshit-anyscale harshit-anyscale added the go add ONLY when ready to merge, run all tests label Oct 14, 2025
Copy link
Contributor

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

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 adds documentation for the new External Scaling Webhook feature. The new documentation page provides a good overview, API reference, and a Python example. I've suggested a couple of improvements to the example code to make it more robust by adding a request timeout and using a more general success check. The other changes to index and config files look good.

Signed-off-by: harshit <harshit@anyscale.com>
@ray-gardener ray-gardener bot added serve Ray Serve Related Issue docs An issue or change related to documentation labels Oct 14, 2025
Copy link
Contributor

@angelinalg angelinalg left a comment

Choose a reason for hiding this comment

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

Cool feature!

Copy link
Contributor

@abrarsheikh abrarsheikh left a comment

Choose a reason for hiding this comment

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

my high level feedback

  1. this content should be part of https://docs.ray.io/en/master/serve/advanced-guides/advanced-autoscaling.html, specifically after Custom autoscaling policies. This will make it easier to tie a story around external scaler and why its needed.
  2. The document is too verbose and can be condensed.

@ray-project ray-project deleted a comment from cursor bot Oct 17, 2025
Co-authored-by: harshit <harshit@anyscale.com>
Signed-off-by: harshit <harshit@anyscale.com>
Signed-off-by: harshit <harshit@anyscale.com>
Signed-off-by: harshit <harshit@anyscale.com>
Signed-off-by: harshit <harshit@anyscale.com>
Signed-off-by: harshit <harshit@anyscale.com>
Signed-off-by: harshit <harshit@anyscale.com>
Copy link
Contributor

@abrarsheikh abrarsheikh left a comment

Choose a reason for hiding this comment

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

can you confirm that the example work if I try to run it as is following the documentation?

Signed-off-by: harshit <harshit@anyscale.com>
cursor[bot]

This comment was marked as outdated.

Signed-off-by: harshit <harshit@anyscale.com>
cursor[bot]

This comment was marked as outdated.

@harshit-anyscale
Copy link
Contributor Author

@cursoragent can you please fix the unresolved review comments on the latest changes?

@cursor
Copy link

cursor bot commented Oct 27, 2025

Perfect! I've successfully addressed all the unresolved review comments on your PR. Here's a summary of the changes I made:

Changes Made:

1. Fixed bug in external_scaler_predictive_client.py

  • Added validation to check if get_current_replicas() returns -1 (error condition)
  • The function now returns early with an error log instead of attempting to scale with invalid data

2. Updated config.md

  • Changed "webhook" to "API" in the external_scaler_enabled description
  • Added a reference link to the External Scaling API section for more details

3. Restructured External Scaling API section in advanced-autoscaling.md

  • Updated the introductory description to match the suggested text
  • Consolidated "Enable external scaler" and "API endpoint" sections into the "Example: Predictive scaling" section
  • Moved configuration and API usage details into the example flow for better organization
  • Added the (serve-external-scale-api)= anchor label for cross-referencing

4. Fixed relative path references

  • Changed absolute URLs (https://docs.ray.io/...) to relative paths (../api/doc/...) for:
    • ScaleDeploymentRequest schema reference
    • ServeInstanceDetails schema reference
  • This makes the references consistent with the rest of the documentation

All review comments have been addressed, and the documentation is now more organized with proper cross-references and consolidated information flow.


Open in Cursor Open in Web

Learn more about Cursor Agents

Co-authored-by: harshit <harshit@anyscale.com>
Signed-off-by: harshit <harshit@anyscale.com>
Signed-off-by: harshit <harshit@anyscale.com>
Signed-off-by: harshit <harshit@anyscale.com>
Signed-off-by: harshit <harshit@anyscale.com>
Signed-off-by: harshit <harshit@anyscale.com>
Signed-off-by: harshit <harshit@anyscale.com>
- **Query current replica count**: You can get the current number of replicas for any deployment by querying the GET `/applications` API:

```bash
curl -X GET http://localhost:8265/api/serve/applications/ \
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this trailing backslash intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had
any activity for 14 days. It will be closed in another 14 days if no further activity occurs.
Thank you for your contributions.

You can always ask for help on our discussion forum or Ray's public slack channel.

If you'd like to keep this open, just leave any comment, and the stale label will be removed.

@github-actions github-actions bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Nov 14, 2025
@abrarsheikh abrarsheikh merged commit d50cb5b into master Nov 24, 2025
6 checks passed
@abrarsheikh abrarsheikh deleted the add-docs-for-post-api branch November 24, 2025 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs An issue or change related to documentation go add ONLY when ready to merge, run all tests serve Ray Serve Related Issue stale The issue is stale. It will be closed within 7 days unless there are further conversation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants