[Serve] Downstream deployments over-provision when receiving Deployme…#60747
[Serve] Downstream deployments over-provision when receiving Deployme…#60747abrarsheikh merged 1 commit intomasterfrom
Conversation
…ntResponse arguments from slow upstream Signed-off-by: abrar <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request correctly addresses an over-provisioning issue in downstream deployments by resolving request arguments before they are counted as queued. The logic change in router.py is direct and well-commented, and the new test case in test_autoscaling_policy.py effectively validates the fix. I have one suggestion to make the test even more robust against potential timing issues.
|
|
||
| # Wait for all 5 requests to be blocked at SlowUpstream (waiting on signal) | ||
| wait_for_condition(lambda: ray.get(signal.cur_num_waiters.remote()) == 5) | ||
|
|
There was a problem hiding this comment.
To make this test more robust against timing-related flakiness, it would be beneficial to add a short time.sleep() after waiting for the requests to be blocked and before asserting the number of replicas. This ensures that the autoscaler has had sufficient time to make a (potentially incorrect) scaling decision. Given upscale_delay_s is 0.2s, a sleep of 0.5s should be adequate.
| # Give the autoscaler time to potentially make a wrong decision. | |
| # A sleep duration longer than upscale_delay_s (0.2s) ensures that | |
| # we would have seen an upscale event if the fix was not effective. | |
| time.sleep(0.5) | |
ray-project#60747) fixes ray-project#60624 Signed-off-by: abrar <[email protected]> Signed-off-by: tiennguyentony <[email protected]>
ray-project#60747) fixes ray-project#60624 Signed-off-by: abrar <[email protected]> Signed-off-by: tiennguyentony <[email protected]>
ray-project#60747) fixes ray-project#60624 Signed-off-by: abrar <[email protected]>
#60747) fixes #60624 Signed-off-by: abrar <[email protected]> Signed-off-by: elliot-barn <[email protected]>
#60747) fixes #60624 Signed-off-by: abrar <[email protected]>
ray-project#60747) fixes ray-project#60624 Signed-off-by: abrar <[email protected]>
ray-project#60747) fixes ray-project#60624 Signed-off-by: abrar <[email protected]> Signed-off-by: Adel Nour <[email protected]>
ray-project#60747) fixes ray-project#60624 Signed-off-by: abrar <[email protected]>
ray-project#60747) fixes ray-project#60624 Signed-off-by: abrar <[email protected]> Signed-off-by: peterxcli <[email protected]>
ray-project#60747) fixes ray-project#60624 Signed-off-by: abrar <[email protected]> Signed-off-by: peterxcli <[email protected]>
fixes #60624