If the inference pods are all gone, their metrics disappear too. How does a new request trigger scaling, and what happens if an agent times out while the GPU and model are starting?
What wakes a GPU inference pod after it scales to zero?
Answers
Scale on a signal that still exists when the inference deployment has zero replicas. That could be queue depth in Redis or Kafka, or the pending request count from an HTTP interceptor. The request reaches that component first, and the scaler uses its backlog to bring the inference deployment back.
The scaler and whatever holds the work still need to be running somewhere. The GPU pods can be at zero, but the whole request path cannot disappear.
Reply to this answer
Watch the retries. If an agent gives up after 30 seconds and sends the same request again, the original may still be waiting in the queue. You can end up running several copies once the model is ready.
Either allow a timeout long enough for the expected cold start, or return a job ID and have the client poll for the result. Give retries the same request ID and use it to deduplicate work.
Reply to this answer
For interactive agents, keeping one replica warm is the simpler tradeoff if the GPU cost is acceptable. An agent may make several model calls around tool runs, so a long cold start can be especially awkward.
A scheduled minimum replica count is another option. Keep one up during expected busy hours and scale to zero for quieter periods or batch workloads. That still leaves cold starts outside the warm window.
Reply to this answer
Measure the full cold path before setting timeouts. You may be waiting for a GPU node, an image pull, and model weights to load. A node that's already available with weights on local storage can start much faster than a completely cold node, but the actual times depend on the setup.
Also make sure the pod is not treated as ready to serve inference until the model has loaded. Starting a container and having a usable model are different milestones.
Reply to this answer
Add your answer
Answers are reviewed before publication.
_m68!vexdari.2:
An HTTP interceptor can hold a request while the backend starts, but the caller's timeout still has to be long enough for that wait.