Fallback for metricType: Value
Right now keda only supports fallback for metric with a type of "AverageValue"
https://github.com/kedacore/keda/blob/c0c99493304d35cd025c0996ecbabff835a0a7fc/pkg/fallback/fallback.go#L39-L42
I want to add it to metric type of "Value" also, I just wanted to know if there is some kind of a blocker to this?
Hi,
There isn't any blocker from user side, the main blocker I can see here is how you can calculate the required value for setting the desired replicas. I mean, for AverageValue value is easy because you just need to return threshold * desired replicas and the HPA controller will eventually scale to that replica.
Using other metric types, you need to return a value that after HPA Controller calculation results in the desired replicas (tbh, IDK if it's doable, but I think so).
If you are interested on contributing with this, I can assign the issue to you if you want
Assign it to me. I want to try and do it
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.
This issue has been automatically closed due to inactivity.
Hi @yuvalweber Do you have any update?
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.
This issue has been automatically closed due to inactivity.
Would it be feasible to change the metricType to AverageValue if the fallback is active and continue using threshold * desired replicas, then change metricType back to Value when the fallback is no longer needed?
Any updates on this topic? I have a situation where I am using a PostgreSQL KEDA trigger, and my query is of the Value type. However, I would like to ensure that if my database is down, the scaled-up replicas will not remain in that state indefinitely. The fallback option is really useful and should not be limited to AverageValue types.
There isn't any advance in this direction currently, the issue was automatically closed due to inactivity, but we can reopen if if you are willing to take a look and draft a PR 😄
@JorTurFer For the Value and other metrics, can't we just use the amount defined in the fallback.replicas? I mean the fallback only happens in failure cases and it's better than not having it 😅
I mean the fallback only happens in failure cases and it's better than not having it
Actually no. I mean, Value isn't linear and it doesn't depend on the replicas, so the amount of replicas that you will have will scale to max/min in a couple of loops, because doesn't matter the amount of replicas that you have, the value will be always above or below. The only option that I see to extend the fallback to Value metrics is transforming them to AverageValue during the fallback.
WDYT @zroubalik @wozniakjan ?
Looks like https://github.com/kedacore/keda/pull/6655 is a fix for this? This is very exciting for us.
Hi @JorTurFer Can we expect #6655 in the next release? It's a very useful feature for our use case.
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.
This issue has been automatically closed due to inactivity.