-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
triage/acceptedIssues which should be fixed (post-triage)Issues which should be fixed (post-triage)
Description
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
-
Availability of Metrics for Scaling
- The metrics defined in the
PrometheusQuerymust 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.
- The metrics defined in the
-
Behavior of
ScaledObjects with New RevisionsScaledObjects 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.
-
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 relevantScaledObjects remain functional.
- While KEDA supports disabling
-
Injecting Revision Names in Prometheus Queries
- If RevisionName templating and substitution. #84 is merged,
autoscaler-kedawill support injecting revision names into Prometheus queries. - However, since Knative allows users to define their own revision names, this feature may still result in the scaling issues described in point 3. See discussion RevisionName templating and substitution. #84 (comment).
- If RevisionName templating and substitution. #84 is merged,
-
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.
- Metrics used for scaling, such as
-
Handling Substitutions in Prometheus Queries
- Currently, RevisionName templating and substitution. #84 implements substitutions only for the main Prometheus query.
- If additional triggers are defined, this substitution mechanism could be extended to support them as well.
@skonto feel free to add/remove items. I'll log another issue for the scale from zero use case soon.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
triage/acceptedIssues which should be fixed (post-triage)Issues which should be fixed (post-triage)