Skip to content

New Elastic Forecast Scaler #7494

Description

@rickbrouwer

Proposal

Hereby I would like to make a proposal for the Elastic Forecast Scaler based on the predicted value of an Elastic ML Forecast.

The goal is twofold. First, to configure it alongside another scaler so you can scale in advance based on a prediction. And the other use case is to configure it to serve as a fallback, for example, so there's always a predicted value.
There might be a use case to set this up as the only scaler, but of course that also brings risks if the actual demand is different from the forecast.

The idea is that the scaler manages forecasts automatically, no manual intervention is required. When the ScaledObject is deployed, the scaler calls the ML forecast API to create the forecast.
An expiration date is also included with the created forecast so that it can be quickly removed once it is no longer considered needed. Forecasts are renewed automatically.

Forecast diagram

Image

There are a number of requirements to use this scaler:

  • An Elasticsearch cluster with a valid Platinum or Enterprise licence (or an active trial), since ML features require a paid licence tier.
  • A trained ML anomaly detection job with enough historical data to produce a reliable forecast. Elasticsearch ML requires approximately 48 or more result buckets before the model is considered stable enough to forecast.
  • The ML job must be associated with a datafeed that has processed historical data.
  • The ML job must be in the opened state when KEDA polls. If the job was closed after a bounded datafeed run, re-open it before deploying the ScaledObject.
  • The user requires authorization manage_ml. See also here.

Scaler Source

https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-forecast.html

Scaling Mechanics

To scale, you specify how far ahead the scaler should look. A forecast is created, and a prediction is returned from this forecast.

Authentication Source

You can authenticate by using a username/password or apiKey/cloudID if you're using Elasticsearch on Elastic Cloud.

Anything else?

I will make this scaler myself.
And please give a thumbs up if you think this scaler has added value 🙂

Metadata

Metadata

Assignees

Fields

No fields configured for Feature.

Projects

Status
Ready To Ship

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions