Combine multiple triggers as "AND" instead #6086
-
We are using keda to scale deployments based on a queue length. For efficiency reasons it would be very helpful to pause the upscaling of this job based on the number of replicas/pods of a deployment. (If there is no pod available, it means that the application that reads the data went idle and we therefore want to pause scaling up of the jobs I tried this as a very rough sketch: https://github.com/kedacore/keda/compare/main...ArzelaAscoIi:keda:feat/compositeScaler?expand=1 . A composition scaler that takes the SQS and Kubernetes workload scaler and only scales if both would scale. however, for us it would be easier if it would be possible to do something like this:
Is there a smart way to combine triggers like this ? Or is it the suggested way to implement a custom scaler ? ( |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
We are discussing to make it easier to achieve on #3567 |
Beta Was this translation helpful? Give feedback.
-
See https://keda.sh/docs/2.15/reference/scaledobject-spec/#scalingmodifiers and https://keda.sh/docs/2.15/concepts/scaling-deployments/#scaling-modifiers-experimental |
Beta Was this translation helpful? Give feedback.
-
Thank you! The formulas should work for us :) Somehow I didn't find the docs for the formulas / didn't realize that this would be a solution. |
Beta Was this translation helpful? Give feedback.
See https://keda.sh/docs/2.15/reference/scaledobject-spec/#scalingmodifiers and https://keda.sh/docs/2.15/concepts/scaling-deployments/#scaling-modifiers-experimental