Skip to content

fix(serving): add /ready readiness probe route for Vertex and Cloud Run - #47

Merged
ghchinoy merged 1 commit into
GoogleCloudPlatform:mainfrom
ghchinoy:fix/serving-ready-route
Nov 10, 2026
Merged

ghchinoy merged 1 commit into
GoogleCloudPlatform:mainfrom
ghchinoy:fix/serving-ready-route

Conversation

@ghchinoy

@ghchinoy ghchinoy commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds a truthful /ready readiness probe route to the serving image while preserving /health (200) for cold-start progress telemetry, and adds POST-able readiness/health routes for external callers on Vertex dedicated /invoke/* and :rawPredict endpoints:

  • Serving proxy (deploy/cloudrun/server/structured_server.py, dgem.patch):
    • GET /ready and GET /invoke/ready return 503 (with the _health_info() JSON payload) until live upstream vLLM /health answers 200, and 503 again if the upstream engine stops answering (preventing stale warmup_state.json vllm_ready: true from masking post-start crashes/OOMs). GET /health stays 200 unconditionally for cold-start telemetry.
    • POST /ready (/invoke/ready), POST /health (/invoke/health), and POST /predict / /rawPredict with {"ready": true} provide POST-able readiness and telemetry probes (X-DGem-Key enforced when DGEM_SERVER_KEY is set) because Vertex dedicated endpoints reject external GET requests on /invoke/* routes (404).
  • Platform probes & scripts (scripts/deploy_vertex_endpoint.sh, deploy/cloudrun/service.yaml, scripts/deploy_cloudrun_vllm.sh, scripts/gpu_smoketest.sh):
    • Vertex healthRoute now points at "/ready" so crash-looping engines fail deployment rather than reporting SUCCESSFULLY_DEPLOYED.
    • Cloud Run startupProbe uses httpGet /ready (failureThreshold: 180, ~15m startup window).
  • Gateway & matrix client routing (cmd/serve.go, scripts/matrix/net.py):
    • Converts Vertex /invoke and :rawPredict health/readiness probes to POST (POST .../invoke/predict {"health": true} for backward compatibility with existing deployments, and POST /ready / {"ready": true} for readiness checks).
  • Tests & docs (deploy/cloudrun/server/test_ready_route.py, test_predict_route.py, scripts/matrix/test_matrix.py, cmd/vertex_status_swr_test.go, docs/, docs-site/):
    • Unit coverage across GET and POST /ready, /health, and /predict {"ready": true} (503 -> 200 -> 503 transitions, X-DGem-Key enforcement, HTTP/1.1 keep-alive body draining) and synced Vertex / Cloud Run / evaluation docs.

Closes #46

@ghchinoy
ghchinoy force-pushed the fix/serving-ready-route branch from 731698c to 4550ee2 Compare November 10, 2026 14:30
@ghchinoy
ghchinoy marked this pull request as ready for review November 10, 2026 14:30
@ghchinoy
ghchinoy merged commit bfbfa24 into GoogleCloudPlatform:main Nov 10, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Serving image: /health returns 200 while the vLLM engine is crash-looping, so Vertex AI marks a broken deployment as healthy

1 participant