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

Document usage recommendations and considerations (scale from 1) #86

Open
muscionig opened this issue Dec 6, 2024 · 0 comments
Open

Comments

@muscionig
Copy link
Contributor

This issue tracks recommendations and considerations when using the autoscaler-keda plugin. Most of these points are summarized from the following conversation: Slack discussion.

Context

The autoscaler-keda plugin creates ScaledObjects to manage the scaling of Knative services. Each revision of a Knative service gets its own ScaledObject, which is versioned accordingly.


Considerations & Recommendations

  1. Availability of Metrics for Scaling

    • The metrics defined in the PrometheusQuery must be available for scaling to occur.
    • If the metric originates from the service itself, at least one replica must remain active to provide the necessary data.
  2. Behavior of ScaledObjects with New Revisions

    • ScaledObjects persist even after a new revision is created. If a metric triggers scaling, multiple revisions can scale up simultaneously, even if traffic routing is configured to target only the latest revision.
  3. Disabling ScaledObjects and Traffic Splitting

    • While KEDA supports disabling ScaledObjects, this is not a viable option for Knative services that require traffic splitting across revisions. Traffic splitting mandates that all relevant ScaledObjects remain functional.
  4. Injecting Revision Names in Prometheus Queries

  5. Traffic Splitting and Metrics for Scale-Up

    • Metrics used for scaling, such as http_request_total, should account for traffic splitting:
      • A common metric could be used with proportional scaling applied to each revision based on its traffic share.
      • Alternatively, a label could be injected into the metric to differentiate revisions.
  6. Handling Substitutions in Prometheus Queries

@skonto feel free to add/remove items. I'll log another issue for the scale from zero use case soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant