Skip to content

[Serve] Skip sending autoscaling metric when previous one is in flight#61515

Draft
abrarsheikh wants to merge 4 commits intomasterfrom
60680-abrar-metrics
Draft

[Serve] Skip sending autoscaling metric when previous one is in flight#61515
abrarsheikh wants to merge 4 commits intomasterfrom
60680-abrar-metrics

Conversation

@abrarsheikh
Copy link
Contributor

No description provided.

@abrarsheikh abrarsheikh added the go add ONLY when ready to merge, run all tests label Mar 5, 2026
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 introduces a mechanism to avoid sending new autoscaling metrics to the controller if a previous request is still in flight. This is a good optimization to prevent overwhelming the controller. The implementation in both replica.py and router.py uses a lock and checks the status of the previous request's ObjectRef before sending a new one. This looks correct.

I've made a couple of minor suggestions to update comments that were inconsistent with the new logic. Otherwise, the changes look good.

Signed-off-by: abrar <abrar@anyscale.com>
Signed-off-by: abrar <abrar@anyscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant