DEV Community

Cover image for Ray 2.60 Serve Changes for LLM Fleets: Surge Rolling Updates, a 13.5x Cheaper Controller Loop, and an 8 MiB HAProxy Buffer
AI Tech News
AI Tech News

Posted on

Ray 2.60 Serve Changes for LLM Fleets: Surge Rolling Updates, a 13.5x Cheaper Controller Loop, and an 8 MiB HAProxy Buffer

TL;DR: Ray 2.60.0 (tagged 2026-11-04, followed by security-focused patch 2.60.1 on 2026-11-23) has an unusually large Ray Serve section. Four changes matter for LLM serving fleets. First, max_surge_percent starts replacement replicas before old ones stop, so a rolling update no longer cuts capacity. Second, a rolling update whose new replicas keep failing now halts at DEPLOY_FAILED and leaves old replicas routable. Third, autoscaling metrics move to a columnar format that the release notes say cuts controller loop cost by 2.8x to 13.5x at 64 to 4,096 replicas per handle. Fourth, the HAProxy ingress buffer grows from 256 KiB to 8 MiB so body-aware routers can see million-token prompts, while maxconn drops from 20,000 to 4,096. One change is breaking: root_path now follows the ASGI spec, and requests that still carry the prefix return 404. This post walks through each item, shows the arithmetic behind the buffer change, and ends with a pre-upgrade checklist. Facts come from the public release notes; calculations and code are labeled illustrative.

Ray Serve controller loop cost reduction range from the 2.60 release notes

What did Ray 2.60 change for Ray Serve?

The release notes group the Serve work into new features, enhancements, fixes and refactors. Reading them as an operator rather than a contributor, the items sort into four themes:

Theme Items Default behavior change?
Update safety max_surge_percent, halt at DEPLOY_FAILED, old replicas stay routable Halt-on-failure: yes. Surge: no (default 0)
Control plane cost Columnar autoscaling metrics, controller-only aggregation Yes, both
Ingress and draining HAProxy buffer and maxconn, 5 s connect bound, listener close on drain Yes
Correctness root_path, stranded requests, multiplexed routing, gang scheduling root_path: yes, breaking

Two other items change threading and discovery: sync deployment methods now run in a thread pool by default, and gRPC server reflection is on by default. Both deserve a look before you roll out, and both have an environment variable or option to restore old behavior.

How does max_surge_percent change a rolling update?

Before 2.60, Serve's rolling update was stop-then-start in effect. With a deployment of 10 replicas, the controller stops some old replicas and starts new ones, and while the new ones load weights, capacity sits below target. For an LLM replica that loads tens of gigabytes of weights, that gap can last minutes.

max_surge_percent inverts the order. The notes say it "starts new replicas before stopping old ones, keeping capacity at the target during a rolling update", with a default of 0 that keeps the old behavior. Here is an illustrative config (check your version's schema before copying):

# Illustrative sketch, not copied from the release notes.
from ray import serve

@serve.deployment(
    num_replicas=10,
    max_surge_percent=20,   # allow up to 2 extra replicas during the update
    ray_actor_options={"num_gpus": 1},
)
class LLMReplica:
    ...
Enter fullscreen mode Exit fullscreen mode

The catch is obvious for GPU fleets: a surge replica needs a free GPU. With 10 replicas pinned to 10 GPUs and a 20 percent surge, you need 12 GPUs available during the update, or the autoscaler must be able to add nodes. If you run a fixed-size cluster with no spare accelerators, surge cannot help you and the update will wait. That is a capacity planning question, not a Ray bug, but it is the first thing to check.

A related feature arrives for pack scheduling. With RAY_SERVE_USE_PACK_SCHEDULING_STRATEGY=1, once all deployments are stable, the controller can migrate replicas off a partially used node so the cluster autoscaler can release it, again starting replacements before stopping the originals. Tuning uses RAY_SERVE_NODE_COMPACTION_DELAY_S and related settings. For spot-heavy clusters this is a cost lever, but it also means replicas move after a deploy has finished, so make sure your readiness checks are strict.

What happens now when a rolling update fails?

This is the change I would test first. The notes list two fixes: surviving old replicas keep serving traffic when an update fails, and the update stops at the startup-failure threshold and stays DEPLOY_FAILED, including across controller restarts, instead of replacing every healthy old replica. Opt-out is RAY_SERVE_STOP_FAILED_ROLLING_UPDATES=0.

The failure scenario it addresses is a classic one for LLM serving: you roll out a new image or config where the model fails to load (wrong tensor-parallel size, a missing weight shard, an out-of-memory start). If the controller keeps retrying and keeps replacing healthy replicas, a bad rollout turns into a full outage. With the new behavior the blast radius is bounded by the failure threshold.

What to verify in staging:

  1. Push a deliberately broken config and confirm the deployment status reaches DEPLOY_FAILED.
  2. Confirm requests still succeed against the remaining old replicas.
  3. Restart the controller and confirm the status persists.
  4. Fix the config and confirm the next update proceeds normally.

If your alerting keys on a deployment sitting in UPDATING too long, add DEPLOY_FAILED as an explicit alert, because a halted update is quiet by design.

Why did the controller loop get cheaper, and does it matter below 64 replicas?

Autoscaling in Serve works from metrics that routers report to the controller. Before 2.60, handle metric reports were pickled Python objects. Now they are flat numeric arrays by default, and the controller merges them in one vectorized pass. The notes state the controller loop cost drops 2.8x to 13.5x at 64 to 4,096 replicas per handle. Set RAY_SERVE_COLUMNAR_AUTOSCALING_METRICS=0 to revert.

Two caveats from the text. The range is for the stated replica counts, and the notes do not publish per-point numbers, so I cannot tell you which end applies to a 200-replica handle. And if you run 8 to 16 replicas per handle, as many LLM deployments do because each replica holds several GPUs, you are below the measured range and should not expect a visible change. The benefit is for large replica counts, such as many small embedding or reranker replicas.

Related, and a default change: autoscaling metrics are now always aggregated at the controller. The RAY_SERVE_AGGREGATE_METRICS_AT_CONTROLLER flag was removed, and because it defaulted to off, behavior changes. The notes say controller-side aggregation is correct across sources and for max and min aggregation. If you have custom autoscaling policies, retest them. Custom autoscaling policies also move from experimental to beta, and a new alpha PrometheusQueryMixin lets a policy scale on Prometheus metrics, refreshing PromQL results in a background thread so reads never block on the network.

Also note the new docs warning: very low metrics_interval_s values can overload the controller. If a past tuning pass set it aggressively to speed up scale-up, revisit it.

Why does the HAProxy buffer grow to 8 MiB, and what does it cost in memory?

Serve can run HAProxy in front of replicas for direct ingress. Two production defaults changed:

  • Connection attempts are bounded at 5 s, and live traffic marks dead replicas down without waiting for a health check, so retries reach a healthy replica sooner.
  • The ingress buffer grows from 256 KiB to 8 MiB "so body-aware LLM routing sees full million-token requests", and maxconn falls from 20,000 to 4,096 "to cap buffer memory".

A router that picks a replica by prefix cache affinity has to read the request body first. A buffer smaller than the body means it sees only a prefix. At roughly 4 bytes of UTF-8 text per token as a rule of thumb, a million-token prompt is on the order of 4 MB of text, which fits in 8 MiB and does not fit in 256 KiB. That is my arithmetic, not a figure from the notes.

Now the memory bound. Treat it as a worst case where every allowed connection fills its buffer, which real traffic will not do:

# Illustrative worst-case arithmetic, not a measured figure.
old = 20_000 * 256 * 1024          # bytes
new = 4_096 * 8 * 1024 * 1024
print(old / 2**30, new / 2**30)    # ~4.88 GiB vs 32.0 GiB
Enter fullscreen mode Exit fullscreen mode

So the worst-case buffer ceiling rises from about 4.9 GiB to 32 GiB even though maxconn shrank by almost 5x. The maintainers lowered maxconn to cap it, which is sensible, but if you run HAProxy on small ingress nodes, check the memory limit on that process and watch resident memory under a load test with large bodies. Also confirm that 4,096 concurrent connections is enough for you: streaming LLM responses hold connections open for a long time, so connection count tracks concurrent streams, not request rate.

Worst-case ingress buffer ceiling, old vs new defaults (illustrative arithmetic)

Graceful draining also improved. After the deregistration window ends, a draining direct-ingress replica behind HAProxy closes its HTTP listener, so late requests from stale HAProxy workers are refused and retried elsewhere. The notes say this removed about 40 client errors per spot-interruption event in a staging fleet. That is one team's staging number, so treat it as a direction rather than a promise. Separately, the controller now sees nodes Ray has marked as draining, for example when ray start --block receives SIGTERM, so replicas and proxies migrate off them instead of failing in-flight requests.

What is the one breaking change?

root_path now follows the ASGI spec in every ingress mode. The notes say this fixes direct ingress returning 404 for every request, including /-/healthz, and HAProxy stripping the prefix twice. uvicorn is upgraded to 0.53 (minimum 0.26). The breaking part: requests that still include the root_path prefix now return 404. Either strip the prefix at your ingress or unset root_path.

A quick pre-upgrade probe, illustrative:

# Before and after the upgrade, compare these three status codes.
curl -s -o /dev/null -w "%{http_code}\n" http://INGRESS/PREFIX/-/healthz
curl -s -o /dev/null -w "%{http_code}\n" http://INGRESS/-/healthz
curl -s -o /dev/null -w "%{http_code}\n" http://INGRESS/PREFIX/v1/models
Enter fullscreen mode Exit fullscreen mode

If you front Serve with a path-rewriting gateway, this is the item most likely to cause an incident on upgrade day, because health checks that include the prefix will start failing and a load balancer can pull every replica at once.

Which routing and scheduling bugs were fixed?

The fix list is long. The ones that matter for LLM routing:

  • Stranded requests. Routing tasks now stay alive until they assign the request they own. Previously an early exit could leave requests waiting forever with exact-match routers such as KVAwareRouter.
  • Multiplexed routing. Routing through an ingress request router now retries instead of returning HTTP 503 while model-location metadata propagates, and dead replicas are dropped from the multiplexed model map, preventing a KeyError that silently stranded requests. New in the same area: direct-ingress deployments accept multiplexed model IDs over HTTP and gRPC, and RoundRobinRouter prefers replicas already hosting the requested model.
  • Gang scheduling. A gang's shared placement group is removed only when its last member stops, instead of killing siblings still serving. The controller also no longer crashes on recovery when the Ray state API is unreachable during placement group leak detection. Multi-GPU tensor-parallel replicas commonly use gangs, so this is relevant.
  • Redeploys. Redeploying while the previous version is still being torn down no longer triggers spurious DeploymentUnavailableError rejections.
  • Config overrides. Removing an option from a deployment's config now restores the in-code value instead of keeping the old override. This one can change behavior silently: if you removed an override months ago and the stale value was still in effect, the code default now applies.
  • Clock skew. Handle metric staleness is measured from when the controller received the report, so skewed clocks no longer drop fresh metrics early.

What do the patch releases add, and is 2.60.1 a security release?

2.60.0 itself carries security items: Ray Data readers now reject pickled-object columns, closing a remote code execution path through several readers (LeRobot, Databricks, Iceberg, Hugging Face, ClickHouse, BigQuery and Delta Sharing), plus pinned certifi, pip and aiohttp versions in images and wheels.

2.60.1 (2026-11-23) is described as security and bug fixes. Two items stand out. A Brotli decoder out-of-bounds write (CVE-2026-111497, which the notes say is listed in CISA KEV) is fixed by moving brotli to 1.2.1, and the notes point out that the conda brotli-python 1.1.0 in the base images was not managed by any pip lock, so every ray, ray-ml and ray-llm image carried the vulnerable decoder until now. Second, with token authentication enabled, ray.init() and ray get-auth-token --generate wrote ~/.ray/auth_token with the default umask, typically 0644, so other local users could read it. Ray now creates it as 0600 in a 0700 directory. A file created by an older version keeps its old permissions, so run chmod 600 ~/.ray/auth_token yourself.

Patch releases for older lines also appeared in the releases list (2.59.2, 2.58.2, 2.57.2, tagged 2026-11-18 to 2026-11-24), so a fleet pinned to an older minor can check those tags for the same class of fixes without jumping to 2.60. I did not read their notes line by line, so verify what each contains.

Pre-upgrade checklist

  1. Count GPUs for surge. If you want max_surge_percent, confirm headroom or autoscaler capacity. Leave it at 0 on fixed clusters.
  2. Test a failed rollout. Verify DEPLOY_FAILED, surviving traffic and controller-restart persistence. Add an alert on that status.
  3. Probe root_path paths. Compare health and API status codes with and without the prefix before and after.
  4. Load-test HAProxy memory. Send large bodies at realistic concurrency and watch resident memory against the 32 GiB worst-case ceiling.
  5. Retest custom autoscaling policies. Controller-only aggregation changes defaults.
  6. Check sync methods. If a deployment keeps unsynchronized shared state in a sync method, either make it thread-safe or set RAY_SERVE_RUN_SYNC_IN_THREADPOOL=0 and plan the fix.
  7. Review gRPC reflection. It is now on by default through the gRPC proxy. If you do not want service discovery exposed, set gRPCOptions(enable_reflection=False) or pass --grpc-disable-reflection.
  8. Target 2.60.1 rather than 2.60.0, and fix the auth token file mode on existing hosts.
  9. Use the escape hatches deliberately. Each default change has a variable to revert it. Record which ones you set, and remove them after the fleet is stable.

FAQ

What is max_surge_percent in Ray Serve?
A deployment option that starts replacement replicas before stopping old ones during a rolling update, so capacity stays at target. The default 0 keeps the previous stop-then-start behavior.

Does the 13.5x controller speedup apply to my deployment?
The notes give 2.8x to 13.5x lower controller loop cost at 64 to 4,096 replicas per handle. Below that replica count you are outside the stated range, and the notes do not publish per-point values.

How do I turn off the new default behaviors?
Each has a switch: RAY_SERVE_COLUMNAR_AUTOSCALING_METRICS=0, RAY_SERVE_STOP_FAILED_ROLLING_UPDATES=0, RAY_SERVE_RUN_SYNC_IN_THREADPOOL=0, and enable_reflection=False for gRPC. The controller-side aggregation flag was removed, so it has no switch.

Why would my requests return 404 after upgrading?
Most likely root_path. Requests that still include the prefix now return 404. Strip the prefix at your ingress or unset root_path.

Is Ray 2.60.0 safe to deploy, or should I wait for 2.60.1?
2.60.1 adds a fix for a Brotli decoder vulnerability in the images and a file permission fix for the token file, so it is the better target. This is my recommendation from reading the notes, not an official statement.

Where are the official notes?
On the ray-project/ray GitHub releases page, under tags ray-2.60.0 and ray-2.60.1.

Further reading

Sources: Ray 2.60.0 release and Ray 2.60.1 release.

Top comments (0)