By Super Washington BangaDeployment Log
Med-Core v1.0First scale-to-zero verification on Azure Container Apps
Deployment log for the first verified scale-to-zero run on Azure Container Apps: zero replicas overnight, KEDA-triggered warm-up on the first request, and the cold-start latency budget observed before and after.
What Worked
- Terraform min-replicas of zero applied and confirmed in the portal
- KEDA scale-up fired within one polling interval of the first request
- Cost graph confirmed zero compute hours for the idle overnight window
What Failed
- First cold request after idle cost 8.4s versus 320ms warm
- JWT key cache was cold, adding a Key Vault round trip to startup
Key Lessons
- Track cold-start latency as a first-class deploy metric
- Warm-up health probes, not request traffic, should prime caches
Deploy
The shared Terraform module shipped min_replicas = 0 for the intake
worker, and the revision rollout confirmed it:
bash
az containerapp show \
--name med-core-worker \
--resource-group med-core-rg \
--query "properties.template.scale.minReplicas"
# 0
Verification
- 02:00 — worker at zero replicas, confirmed in the portal and the cost graph (zero compute hours for the idle window).
- 09:12 — first request after idle: KEDA scaled up within one polling interval, well inside the configured scale-in delay.
- 09:13 — first cold request took 8.4s versus 320ms warm: the JWT key cache had dropped on scale-to-zero, adding a Key Vault round trip to startup.
Follow-ups
- Prime caches with a health-probe warm-up instead of waiting for request traffic.
- Tune the scale-in delay per workload; the worker wants a longer linger than the API.
- Distinguish cold-start latency from regressions in the dashboards (ADR-003 open question).