﻿# Ray Serve max_ongoing_requests: replica admission is not physical parallel execution

Interpret Ray Serve ongoing-request limits per replica without assuming every assigned request executes simultaneously on a model or accelerator.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-ray-serve-max-ongoing-per-replica-execution-slots/
Language: en

## Admission rises without a matching speedup

An operator raises max_ongoing_requests on a synchronous model deployment, expecting every newly admitted request to execute immediately. Throughput barely changes while tail latency rises. The configuration allowed more work to be assigned to a replica, but did not make the prediction function physically parallel.

Separate assignment, replica-local waiting and model execution. The same observed ongoing-request count can represent different execution behavior for a blocking method, an asynchronous orchestration method or a batched inference implementation.

## The limit belongs to each replica

The [deployment configuration guide](https://docs.ray.io/en/latest/serve/configure-serve-deployment.html) defines max_ongoing_requests as the maximum queries sent to a replica before responses are received. It is not an application-wide request count or a declaration of accelerator execution slots.

Review replica count and the request path together. Multiplying a limit by configured replicas can still misrepresent current usable capacity while replicas are starting, failing or waiting for model initialization to complete.

## Autoscaling uses another target

The [autoscaling guide](https://docs.ray.io/en/latest/serve/advanced-guides/advanced-autoscaling.html) distinguishes the target average ongoing requests from the maximum assigned to a replica. It explains that ongoing work can include requests waiting at a replica and that an excessive maximum can hurt routing during scale-up.

[Latency-stage diagnosis](/journal/triton-latency-stage-diagnosis/) provides useful background: model compute and waiting time must be measured separately. A larger assignment allowance can move waiting inward without improving the actual service rate.

## Deployment options do not rewrite model code

The [deployment API](https://docs.ray.io/en/latest/serve/api/doc/ray.serve.deployment_decorator.html) exposes request limits alongside replica and resource settings. Those controls configure serving behavior; they do not automatically vectorize a model method or change its accelerator-memory requirements.

[Allocator memory accounting](/journal/cuda-oom-reserved-vs-allocated/) helps assess the cost of overlapping work when genuine concurrency exists. Observe live activations and runtime allocations rather than assuming that every accepted request is either free or backed by a dedicated model copy.

## Compare queue placement and final outcomes

Keep input sizes and model revision fixed while varying the replica limit. Record assigned work, caller latency, useful completion rate and resource peaks, including a traffic increase that triggers scale-up.

Choose a limit that supports the intended method behavior without hiding a large backlog inside busy replicas. The evidence should explain where requests wait and how many execute usefully, not simply report a larger number accepted by the serving configuration.
