keda icon indicating copy to clipboard operation
keda copied to clipboard

Introduce `activationThreshold`/`minMetricValue` for all scalers

Open zroubalik opened this issue 2 years ago • 13 comments

Proposal

Current activation (ie. scaling 0<->1) is happening if there's any activity on the target scaler, ie. the condition for comparison is metricFromScaler > 0. The threshold property on individual scalers is not respected, it is just applied to 1<->N scaling. There are 2 scalers that supports flexible activation configuration, AWS Cloudwatch and Huawei Cloudeye (via minMetricValue property), where the default value is 0. The condition for comparison in this case is: metricFromScaler > minMetricValue.

We might want to introduce the same capability for all scalers.

  • [ ] introduce activation threshold for all scalers
  • [x] properly document activation (the current state and the new option)

Pending to implement:

  • [x] Influx Scaler -> https://github.com/kedacore/keda/pull/3516
  • [x] Kafka Scaler -> https://github.com/kedacore/keda/pull/3501
  • [x] New Relic Scaler -> https://github.com/kedacore/keda/pull/3427
  • [x] RabbitMQ Scaler -> https://github.com/kedacore/keda/pull/2831
  • [x] Redis Scaler -> https://github.com/kedacore/keda/pull/3415

Will not implement this:

  • CPU/Memory
  • Cron
  • Redis Stream -> [HELP NEEDED] https://github.com/kedacore/keda/pull/3415#issuecomment-1193181474

Use-Case

No response

Anything else?

No response

zroubalik avatar Mar 22 '22 22:03 zroubalik

@adborroto , @xoanmm Maybe anyone of you is interested on this 😉

JorTurFer avatar Mar 23 '22 19:03 JorTurFer

About the name of this new property. Will be a generic name or specific by sealer? IMO, a specific name makes more sense and would be self-explanatory sometimes.

adborroto avatar Mar 28 '22 14:03 adborroto

Agree, I'd do something that I have suggested on the PR: activation* prefix to the current field that holds the value/queuelength/threshold in each scaler.

But I am definitely open to another options.

zroubalik avatar Mar 28 '22 14:03 zroubalik

What do you think if we use this change to unify those parameters? I mean, we can rename all of them into threshold/activationThreshold and keep the consistency accros all the scalers. Of course, the current case must be maintained but we can deprecate it. IMO having more options makes the things more complex, and at the end of the day, the "unit" of the threshold depends on the scaler, but the goal is always the same

JorTurFer avatar Mar 28 '22 15:03 JorTurFer

We would also like this feature for kafka scaler.

ybialik avatar Apr 11 '22 08:04 ybialik

Related with this issue, during the last standup we decided to continue with it for all scalers, and we also agree with using activation* as a prefix for every scaler where * is the current metric name because it has enough context for each scaler users image

JorTurFer avatar Apr 11 '22 09:04 JorTurFer

@ybialik as @JorTurFer mentioned, we plan to have this for all scalers, so you can contribute this for Kafka :)

zroubalik avatar Apr 11 '22 11:04 zroubalik

@zroubalik I am only a user, I can only contribute my feedback :)

ybialik avatar Apr 11 '22 12:04 ybialik

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 10 '22 12:06 stale[bot]

This issue has been automatically closed due to inactivity.

stale[bot] avatar Jun 17 '22 19:06 stale[bot]

Is every scaler done now?

v-shenoy avatar Aug 08 '22 14:08 v-shenoy

Redis Streams is missing because we are not sure about the functionality. If you happen to have Redis Streams knowledge, or know anybody, open a PR for that please!

zroubalik avatar Aug 08 '22 15:08 zroubalik

@v-shenoy here is the Redis Streams related discussion: https://github.com/kedacore/keda/pull/3415#issuecomment-1193181474

zroubalik avatar Aug 08 '22 15:08 zroubalik

I think this is ready. I close it for the moment

JorTurFer avatar Nov 06 '22 17:11 JorTurFer