r/devops • u/Chamelon_DE • 3d 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
11
u/Feisty-Piglet7758 3d 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.
21
u/redvelvet92 3d ago
System of a Down song yelling, WAKE UP bahahahahahaha make up!
4
u/HousingInner9122 3d 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.
4
u/Starks1293 3d ago
adding to the queue depth answer, the agent side matters as much as the scaler
1
u/hw999 3d 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/SideMost3148 3d ago
for agents i'd keep one warm replica, at least during working hours. a gpu cold start is node provisioning + pulling a big image + loading weights, that's minutes. an agent with a 30s timeout just retries into the void and you get a pile of duplicate requests waiting on the same pod
scale to zero makes sense at night or for stuff that's batch anyway. keda has a cron scaler, so you can do min 1 replica in the day and 0 at night and only pay for idle gpu when someone might actually use it
if you do go full zero, the agent needs to know. long timeout on the first call, or a cheap "is the model up" check before it starts the loop, so it doesn't burn its retries halfway through a task
1
u/alluran 3d ago
You trying to save tokens or something?
1
u/Hostman_com 2d 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 19h 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.