Skip to content

Scale-to-zero & cold starts

Scale to zero when the savings from idle replicas justify the delay and delivery consequences of starting again. A small warm pod is often the better choice for latency-sensitive or slow-starting applications.

WorkloadZero pathRequired evidence
HTTP serviceKedify HTTP scaling routes/buffers requests during activationCold-start time, client/proxy timeouts, retry behavior and readiness fit the service objective.
Queue workerKEDA scaler observes the queue while workers stopDurable delivery, acknowledgements, drain/termination and idempotent processing.
Application metricOnly if the selected external signal remains observable with no podsA metric emitted solely by stopped pods cannot reliably activate them.
Slow model or stateful warmupKeep warm capacity or a smaller warm podMemory/model retention, resize feasibility and latency measured under idle-to-active transitions.
Existing Envoy metrics scalerKeep at least one replicaExisting Envoy scaling does not provide scale-to-zero activation.
HTTP requests wait for activation and readiness at zero replicas; a small warm pod retains its process but may still need resource resizing.
Scroll to explore
Diagram description

At zero replicas, Kedify holds the incoming HTTP request while KEDA activates the workload. Scheduling, node provisioning when needed, image pulls and application or model startup occur before a Ready backend can serve the request. A small warm pod retains a process, but restoring resources may still be necessary. Both paths must fit client and proxy timeouts and available capacity.

From active to idle, verify no in-flight request or unacknowledged work is lost. From idle to active, measure time from incoming demand to successful application response—not merely pod creation. Node provisioning, image pulls and model loading are independent delays. Configure waiting/maintenance pages only when appropriate for the clients; a waiting page is not successful processing of an API request.

Use the relevant HTTP or queue tutorial with a bounded test, then repeat it from zero. Set a warm floor if the cold start violates the latency budget. The small warm pod tutorial changes resources through PRP rather than stopping the process. Verify its resource transitions and request latency before changing the warm floor.

If activation or scale-in fails, inspect workload scaling and the signal/timeout path before shortening cooldowns. Restore the previous minimum capacity through the same owner to undo the experiment. Stop when idle behavior and return-to-service time meet the objective; zero is optional.