Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide capability to define autoscaling rules #2614

Open
tomkerkhove opened this issue Feb 9, 2022 · 7 comments
Open

Provide capability to define autoscaling rules #2614

tomkerkhove opened this issue Feb 9, 2022 · 7 comments
Labels
feature All issues for new features that have been committed to needs-discussion

Comments

@tomkerkhove
Copy link
Member

tomkerkhove commented Feb 9, 2022

Proposal

Allow end-users to specify how many instances they want to add/remove when one of the trigger criteria have been met. This allows them to have better control over the aggressiveness of their platform.

In terms of logic, the idea is to define the following:

  • When queue count is > 1000, add 2 instances and wait for 15 min to scale out more
  • When queue count is < 100, remove 1 instance and wait 5 min to scale in more

Or even more advanced by using multiple triggers:

  • When queue count is > 1000 (trigger 1) and DB CPU is <60 (trigger 2), add 2 instances
  • When queue count is < 100 (trigger 1) or DB CPU > 80 (trigger2), remove 1 instance

The important aspects here are:

  • Scale in/out can have different amount of replicas to add/remove
  • End-users can define cooldown periods during which no further scaler is added
  • Combination of triggers can be used, either with an OR or AND fashion.

This would work similarly to traditional autoscalers such as Azure Monitor Autoscale:
image

Use-Case

While today end-users can already define the triggers for scaling in/out, sometimes this can be confusing and people want to have more control about when scaling will happen and how many instances will be added.

For example, they might want to scale out more aggressively than KEDA does or scale in less aggressively.

Anything else?

I believe these 2 "scaling flavors" should be offered next to each other and am not sure if we should mix it with the current approach.

The current way of scaling definitely still has its place and should not be removed.

@tomkerkhove tomkerkhove added needs-discussion feature-request All issues for new features that have not been committed to labels Feb 9, 2022
@tomkerkhove tomkerkhove moved this to Backlog in Roadmap - KEDA Core Feb 10, 2022
@tomkerkhove tomkerkhove moved this from To Do to Proposed in Roadmap - KEDA Core Feb 14, 2022
@stale
Copy link

stale bot commented Apr 10, 2022

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 stale bot added the stale All issues that are marked as stale due to inactivity label Apr 10, 2022
@tomkerkhove tomkerkhove added feature All issues for new features that have been committed to and removed feature-request All issues for new features that have not been committed to labels Apr 10, 2022
@stale stale bot removed the stale All issues that are marked as stale due to inactivity label Apr 10, 2022
@JonasSamuelsson
Copy link

Is this something anyone is working on?
It would be a great addition to avoid flapping (https://learn.microsoft.com/en-us/azure/azure-monitor/autoscale/autoscale-flapping).

@tomkerkhove
Copy link
Member Author

Not at the moment because we need to spec it out and probably will face issues since we rely on the HPA but I agree this would be a good one to have because of flapping indeed.

If it would be specced out, would you be interested to contributing to this?

@zroubalik We are blocked because of HPA, right?

@JonasSamuelsson
Copy link

I've never written a single line of go in my life but I would be happy to help in any way I can.

@nagesh-salunke
Copy link

+1, If this is something getting prioritized, Will be happy to contribute

@tomkerkhove
Copy link
Member Author

Definately open to contributions, @nagesh-salunke!

@klinakuf
Copy link

klinakuf commented Jan 18, 2025

+1, would be also happy to contribute, at the University of Stuttgart, Software Quality and Architecture group, we have developed a language for simulation purposes of elastic software architecture called Scaling Policy Definitions.

https://www.palladio-simulator.com/Palladio-Documentation-Slingshot/spd/

Now we are thinking to build an autosaler around this language, would be interesting to integrate Scaling Policy Definitions within KEDA. Would also resolve #3567

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature All issues for new features that have been committed to needs-discussion
Projects
Status: Proposed
Development

No branches or pull requests

4 participants