Repository navigation
Description
What happens
structured_server.py answers GET /health with HTTP 200 in all cases (_health_info(): "always HTTP 200 (the container is up)"). Whether the engine can serve is only reported in the body, as vllm_ready. scripts/deploy_vertex_endpoint.sh sets "healthRoute": "/health", so Vertex AI uses this route to decide that the model is deployed.
When the vLLM engine fails at startup and restarts in a loop, the proxy keeps answering /health with 200 and "vllm_ready": false. Vertex reports the deploy as SUCCESSFULLY_DEPLOYED and routes traffic to it. Every decision request then fails:
- the first requests:
503 Model server early terminated the request (truncated headers)/Connection to backend aborted; - afterwards:
503 The service is temporarily unavailable due to no healthy backend servers.
How to reproduce
Deploy the serving image with a configuration the engine can't start with. Two cases we hit:
- A100 (compute capability 8.0) with the default FP8 KV cache. vLLM fails at engine start with
ValueError: FP8 KV cache is not supported by the Triton attention backend on NVIDIA A100-SXM4-80GB (compute capability 8.0); native FP8 (fp8e4nv) requires SM89+. Re-run with --kv-cache-dtype bfloat16.and restarts in a loop. The deployment still reports healthy. (Workaround:EXTRA_ARGS=--kv-cache-dtype bfloat16.) - L4 with
ENFORCE_EAGER=0at the L4 settings (KV_CACHE_GB=2,MAX_MODEL_LEN=4096). The first request triggerstorch.OutOfMemoryErrorin the engine (22 GiB GPU), the engine exits, and the deployment stays "healthy" while serving only 503s.
In both cases GET /health returned {"status": "ok", ..., "vllm_ready": false} with HTTP 200.
Why it matters
- A deployment that can't answer a single decision looks healthy to Vertex, to anyone checking only the status code, and to rollout scripts that wait for the deploy operation to finish.
- Blue/green rollouts can shift traffic onto it.
- The failure only shows up in the container log, which users have to know to look at.
Suggested fix
Keep the 200 telemetry route for cold-start progress (the gateway, MCP and Studio read it), and give the platform a readiness route that tells the truth:
- add
GET /ready(or/health?ready=1) that returns 503 with the same body untilvllm_readyis true, and 503 again if the upstream engine stops answering; - point
healthRouteinscripts/deploy_vertex_endpoint.shat it, and replace the TCPstartupProbeon port 8080 indeploy/cloudrun/service.yaml(which only checks that the proxy is listening) with anhttpGetprobe on the same route.
Because Vertex waits for the health route before it reports a deploy as finished, a crash-looping engine then makes the deploy time out or fail visibly instead of succeeding.
Smaller, docs-only change in the meantime: in docs/deploy/evaluate.md and the Vertex/Cloud Run guides, say to wait for "vllm_ready": true in the /health body before sending traffic, not for HTTP 200.
Tests
- Unit test in
deploy/cloudrun/server/: with no upstream listening,/readyreturns 503 and/healthreturns 200 withvllm_ready: false; with a stub upstream returning 200, both return 200.
Activity
fix(serving): add /ready readiness probe route and POST invoke probes
ghchinoy commentedon Nov 9, 2026
Additional Vertex dedicated-endpoint routing note covered in #47:
GETonhealthRoute(GET /readyon container port8080), external callers hitting a dedicated endpoint's/invoke/*prefix now receive404 Could not resolve ... to a methodonGETrequests — onlyPOSTis routed externally on/invoke/*(and:rawPredict).GET /readyandGET /invoke/ready(kept open for platformhealthRoute/startupProbechecks),structured_server.pynow also answers:POST /readyandPOST /invoke/ready(200whenvllm_readyistrue,503otherwise),POST /healthandPOST /invoke/health(200cold-start telemetry), andPOST /predict/POST /rawPredictwith{"ready": true}(200whenvllm_readyistrue,503otherwise;{"health": true}stays200).All
POSTprobes enforceX-DGem-KeywhenDGEM_SERVER_KEYis configured.fix(serving): add /ready readiness probe route and POST invoke probes