Autoscaling jobs with KEDA - processing mulitiple jobs at once. #1149
-
Our use-case is as and when messages come off a service bus we have to scale the pods. For 1 message in queue we want 1 pod with a maximum of 80 pods running in parallel. I used scaled object and scaling a job inorder to do it. The pods are configured such that if no message comes for 10 minutes it exits successfully. The parallelism and completions are 80 with min replicas 0 and max replica 100. (I don't know when and how the min and max replica is used for). The problem is that the scaling is not how we would like it to be. 1 message comes in the queue. It spins up 1 job which in turn spins up 80 pods. One of the 80 pods picks up the message. Messages are usually long running operations. It takes like 1 hour to finish. After 10 minutes the rest of the 79 pods exit successfully since there are no message to perform. LEt's say on the 11th minute 10 more messages come on the queue. The problem is all the 10 messages wait for 1 hours for this 1 pod to complete. Looks like jobs are not parallel. How to make them parallel? I thought maxreplicas was the setting but that doesn't work. My current scaled object setting:
Any help is appreciated :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Update: I understood what the min and max replicas are for. It's for scaling the pods (and not jobs). So, how to run multiple jobs in parallel using KEDA ScaledObject? |
Beta Was this translation helpful? Give feedback.
Update: I understood what the min and max replicas are for. It's for scaling the pods (and not jobs). So, how to run multiple jobs in parallel using KEDA ScaledObject?