r/devops • u/Chamelon_DE • 10d ago
Discussion If your gpu inference pods scale to zero, what actually wakes them back up?
Been reading abt KEDA scale-to-zero for llm inference
Turning off idle gpu pods make sense, but what happen when an ai agent needs the model again?🤔
If u r scaling base on vllm metrics, those metrics disappear once all the pods r gone. So something else has to catch the request n wake them up again.
KEDA’s HTTP interceptor can hold request while the backend starts, but u r still waiting on gpu provisionong n model loading
N what if the agent time out n retries before the model is ready?
For people running this in production, r u keeping one warm replica or just queueing request until the gpu is ready? Especially for agent making multiple llms call between tool runs
12
u/Feisty-Piglet7758 10d ago
The signal you scale on has to exist while zero pods exist, so scale on the work, not on vLLM: Redis or Kafka queue depth, or the interceptor's pending count. Then use one number to decide. Cold GPU node plus weights is 3 to 10 minutes, a warm node with the model on local NVMe is 30 to 90 seconds, and an agent that times out at 30 cannot survive either. Interactive traffic gets minReplicas 1 and scale to zero belongs to batch, and bake the weights into the image or a node cache, because a 40 GB pull is usually the biggest part of that cold start.
4
u/Starks1293 10d ago
adding to the queue depth answer, the agent side matters as much as the scaler
21
u/redvelvet92 10d ago
System of a Down song yelling, WAKE UP bahahahahahaha make up!
4
u/HousingInner9122 9d ago
I'd keep one warm replica for agent workloads, since waiting for GPU provisioning and model loading on every cold start sounds like a nightmare for timeouts and retries.
1
u/hw999 10d ago
Keda keeps a controller pod running when in scale.to zero mode. Its best to have it run on some.cheap CPU nodes.
1
u/alluran 9d ago
You trying to save tokens or something?
1
u/Hostman_com 9d ago
Measure from the agent's first request to the first token after scaling to zero. Test with the GPU node still running, then with the node gone too.
Track node provisioning and model loading separately. Compare both end-to-end times with the agent's timeout before deciding whether a warm node is enough or you need to keep the model loaded.
1
u/Training-Hope-7232 7d ago
Keeping a small warm pool seems like a good middle ground, especially when cold starts and model loading can make agent timeouts pretty unpredictable.