Skip to content

[Serve][Docs] Use default metrics_interval_s in autoscaling examples - #61071

Open
pdwi2020 wants to merge 2 commits into
ray-project:masterfrom
pdwi2020:codex/serve-docs-metrics-interval-default-v2
Open

pdwi2020 wants to merge 2 commits into
ray-project:masterfrom
pdwi2020:codex/serve-docs-metrics-interval-default-v2

Conversation

@pdwi2020

@pdwi2020 pdwi2020 commented Feb 15, 2026 •

Copy link
Copy Markdown

Summary

  • remove metrics_interval_s=0.1 from Serve autoscaling doc-code examples so they use the default interval
  • add a warning in advanced autoscaling docs that very low metrics_interval_s can overload the Serve controller on the head node

Files changed

  • doc/source/serve/doc_code/custom_metrics_autoscaling.py
  • doc/source/serve/doc_code/autoscaling_policy.py
  • doc/source/serve/advanced-guides/advanced-autoscaling.md

Validation

  • python3 -m compileall doc/source/serve/doc_code/autoscaling_policy.py doc/source/serve/doc_code/custom_metrics_autoscaling.py

Closes #61043

@pdwi2020
pdwi2020 requested a review from a team as a code owner February 15, 2026 06:46

@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 improves the autoscaling documentation by removing the explicit setting of metrics_interval_s in examples, thus promoting the use of the safer default value. It also adds a helpful warning about the risks of setting this interval too low. The changes are clear and correct. I've added one comment suggesting a further improvement for consistency in the documentation.

Comment on lines +169 to +174
::{warning}
Setting `metrics_interval_s` too low (for example, `0.1`) can significantly
increase metrics traffic and overload the Serve controller running on the head
node. Keep the default value (`10`) unless you have validated controller
capacity for a lower interval.
::

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.

medium

This is a great warning to add. For consistency with this new guidance, should the other examples in this file that set metrics_interval_s: 2 (e.g., on lines 372, 392, 464, 484, 504) also be updated to use the default value? Using the default value everywhere would make the documentation more consistent and less likely to mislead users.

@abrarsheikh

Copy link
Copy Markdown
Contributor

fix the DCO, you need to sign your commits

@ray-gardener ray-gardener Bot added the community-contribution Contributed by the community label Feb 15, 2026
@pdwi2020
pdwi2020 force-pushed the codex/serve-docs-metrics-interval-default-v2 branch from ece69fe to 458fad8 Compare February 19, 2026 15:52
@github-actions

github-actions Bot commented Mar 6, 2026

Copy link
Copy Markdown

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 Mar 6, 2026
@abrarsheikh abrarsheikh added the go add ONLY when ready to merge, run all tests label Mar 6, 2026
@github-actions github-actions Bot added unstale A PR that has been marked unstale. It will not get marked stale again if this label is on it. and removed stale The issue is stale. It will be closed within 7 days unless there are further conversation labels Mar 6, 2026

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

community-contribution Contributed by the community go add ONLY when ready to merge, run all tests unstale A PR that has been marked unstale. It will not get marked stale again if this label is on it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Serve] autoscaling docs use metrics_interval_s as 0.1

2 participants