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

Enable users to scale a function based on a custom metric #11225

Closed
9 tasks done
kwiatekus opened this issue May 6, 2021 · 7 comments
Closed
9 tasks done

Enable users to scale a function based on a custom metric #11225

kwiatekus opened this issue May 6, 2021 · 7 comments
Assignees
Labels
area/serverless Issues or PRs related to serverless Epic kind/feature Categorizes issue or PR as related to a new feature.
Milestone

Comments

@kwiatekus
Copy link
Contributor

kwiatekus commented May 6, 2021

Description

As a user I want more flexibility when defining scaling rules per function.
I want to define min and max replicas as well as metrics and target utilisation levels

  • CPU & memory Utilisation ( standard on kubernetes metric server )
  • any custom metric ( for example: incomming request rate scraped from istio ( provided that KEDA is included in kyma ))

AC

  • There is no hard dependency between serverless and KEDA; Users can still opt not to use KEDA and use the built-in HPA based scaling
  • As a user I want guidance docu ( recipe ) showing me how to scale my workloads with KEDA (tutorial showing how to scale based on incoming request rate with scale to 0)
  • serverless Function must become an entity scalable by any scaler, i.e KEDA (support for scale subresource)
  • If KEDA is installed users can define define a scaler manifest ( yaml ) that is targeting my function
  • Scale to 0 should be supported

Execution

Reasons

Currently we allow to setup scaling based on CPU utilisation only (APP_FUNCTION_TARGET_CPU_UTILIZATION_PERCENTAGE).
It is not flexible enough. Scaling strategies may vary depending of the workload use case therefore various scaling strategies should be allowed ( i.e event-driven by request rate )

Additionally, the 50% CPU threshold for HPA autoscaling does not do exactly what we anticipate it should do. The presence of istio side car caontainer( with high demand on cpu on its own ) makes this strategy unreliable as HPA controller sees the cpu consumption on the pod level.


⚠️ Funnel process - do not remove!
Name Value
theme Enterprise-grade
business value 5
technical value 2
user value 5
open-source value 10
effort
requested by
@kwiatekus
Copy link
Contributor Author

kwiatekus commented May 6, 2021

We thought originally that we should introduce prometheus adapter as a managed component in kyma, but it might be idle in case somebody is fine with just the standard CPU and memory utilisation targets.

Instead, we would like to enable users to define scaling rules per function based on built-in or ANY custom metrics that re available in the runtime. We would like to show how custom metrics could be enabled but we refrain from enabling them for all as there are no golden metrics suitable for all and they really depend on the use case.

@kwiatekus kwiatekus added area/serverless Issues or PRs related to serverless kind/feature Categorizes issue or PR as related to a new feature. labels May 6, 2021
@kwiatekus kwiatekus self-assigned this May 6, 2021
@kwiatekus kwiatekus added the area/documentation Issues or PRs related to documentation label May 24, 2021
@kwiatekus kwiatekus added this to the 2.0-m2 milestone Jul 5, 2021
@kwiatekus kwiatekus modified the milestones: 2.0-m2, 2.0-m3 Aug 26, 2021
@kwiatekus
Copy link
Contributor Author

Investigating how users could use KEDA + prometheus scaler to scale any workload in kyma

@kyma-stale-bot
Copy link

This issue has been automatically marked as stale due to the lack of recent activity. It will soon be closed if no further activity occurs. Thank you for your contributions.

@kyma-stale-bot kyma-stale-bot bot added the stale label Dec 20, 2021
@kwiatekus kwiatekus removed the stale label Dec 21, 2021
@kwiatekus kwiatekus added Epic and removed area/documentation Issues or PRs related to documentation labels Jan 19, 2022
@kwiatekus kwiatekus modified the milestones: 2.1, Future Jan 24, 2022
@kyma-stale-bot
Copy link

This issue has been automatically marked as stale due to the lack of recent activity. It will soon be closed if no further activity occurs. Thank you for your contributions.

@kyma-stale-bot kyma-stale-bot bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 29, 2022
@kwiatekus kwiatekus removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 5, 2022
@kyma-stale-bot
Copy link

kyma-stale-bot bot commented Jul 4, 2022

This issue has been automatically marked as stale due to the lack of recent activity. It will soon be closed if no further activity occurs. Thank you for your contributions.

@kyma-stale-bot kyma-stale-bot bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 4, 2022
@kyma-stale-bot
Copy link

This issue has been automatically closed due to the lack of recent activity. /lifecycle rotten

@kwiatekus kwiatekus reopened this Jul 21, 2022
@kwiatekus kwiatekus added 2022-Q3 and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jul 21, 2022
@kwiatekus kwiatekus modified the milestones: Future, 2.7 Aug 22, 2022
@kwiatekus
Copy link
Contributor Author

Next steps: #15290

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/serverless Issues or PRs related to serverless Epic kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants