Re:Autoscale Kubernetes workloads on any cloud using any event
by slyall on Tuesday April 30, 2024 @06:18PM
(#40217116)
I had a simple one on a Kubernetes cluster in AWS.
What happened is we'd have a queue processor that normally needed a couple of pods to handle events. Except that once a day another process would drop in 5 million requests into the queue.
So I just had a simple keda autoscaler based on the length of the queue. One pod for every 10,000 items in the queue with a minimum of 2 pods and a maximum of 50 pods.
It would scale up after the big queue dumps, chew threw the backlog and then scale back down again.
What happened is we'd have a queue processor that normally needed a couple of pods to handle events. Except that once a day another process would drop in 5 million requests into the queue.
So I just had a simple keda autoscaler based on the length of the queue. One pod for every 10,000 items in the queue with a minimum of 2 pods and a maximum of 50 pods.
It would scale up after the big queue dumps, chew threw the backlog and then scale back down again.