﻿# Ray Serve autoscaling targets ongoing requests, not a fixed requests-per-second quota

Explain why a Ray Serve ongoing-request target responds to request duration and queueing, so equal arrival rates can lead to different replica demand.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-ray-serve-autoscaling-target-ongoing-not-rps/
Language: en

## Equal arrival rates require different replica counts

An endpoint receives short classification requests during one period and longer document requests during another. The request rate looks similar, yet ongoing work accumulates more during the longer workload. An autoscaling target based on occupancy can therefore produce different replica demand without any increase in requests per second.

Interpret the target in its own unit. It describes how much work remains in progress around each replica, not a fixed throughput promise that holds for every model input distribution.

## The target is average ongoing work per replica

The [autoscaling guide](https://docs.ray.io/en/latest/serve/autoscaling-guide.html) defines target_ongoing_requests as the desired average ongoing requests per replica. Minimum and maximum replica counts define bounds on what the autoscaler can request.

A target cannot guarantee its own achievement when the model is slower than expected or the deployment cannot obtain enough resources. Observe desired replicas and usable running replicas separately when investigating a request backlog.

## Ongoing work can include waiting at the replica

The [advanced guide](https://docs.ray.io/en/latest/serve/advanced-guides/advanced-autoscaling.html) explains the ongoing-request measurement and its relationship with per-replica assignment limits. Work waiting at a replica can contribute to the occupancy signal instead of representing simultaneous accelerator execution.

[Variable-length computation](/journal/variable-length-loss-reduction/) provides background on why payload size changes the work hidden inside a request count. For serving, record length and input mix alongside arrival rate when comparing autoscaling behavior.

## Scaling also has an observation and reaction policy

The [AutoscalingConfig reference](https://docs.ray.io/en/latest/serve/api/doc/ray.serve.config.AutoscalingConfig.html) describes request metrics, look-back behavior, replica bounds and timing controls. The system responds over an observation process rather than instantaneously converting every arriving request into another replica.

[Latency-stage diagnosis](/journal/triton-latency-stage-diagnosis/) helps distinguish cold initialization, queueing and execution. A replica requested by the autoscaler is not necessarily already loaded and ready to process the workload whose occupancy triggered the decision.

## Compare workload regimes instead of one rate number

Test short and long supported requests at controlled arrival rates. Record ongoing work, final latency, desired replicas and ready replicas, keeping the released model and scaling bounds identifiable.

Choose a target from the intended latency and workload behavior rather than translating a business request-rate forecast directly into the same integer. Useful evidence explains how occupancy changes with actual work and where deployment constraints prevent the intended steady state.
