»Strategy Plugins

Strategy plugins compare the current state of the system against the desired state defined by the operator in the scaling policy and generate an action that will bring the system closer to the desired state. In practical terms, strategies receive the current value and a metric value for a resource and output what the new value should be.

»Target Value Strategy Plugin

The target value strategy plugin will perform count calculations in order to keep the value resulting from the APM query at or around a specified target.

»Agent Configuration Options

strategy "target-value" {
  driver = "target-value"
}

»Policy Configuration Options

check "target-value-check" {
  ...
  strategy "target-value" {
    target    = 20
    threshold = 0.0001
  }
  ...
  • target (float: <required>) - Specifies the metric value the Autoscaler should try to meet.

  • threshold (float: 0.01) - Specifies how significant a change in the input metric should be considered. Small threshold values can lead to output fluctuation.

»Fixed Value Strategy Plugin

The fixed value strategy receives a count value as an input configuration option and returns a scaling action whose count is set to the same value. This strategy is useful in situations where there’s a known baseline for the infrastructure that does not change often.

»Agent Configuration Options

strategy "fixed-value" {
  driver = "fixed-value"
}

»Policy Configuration Options

check "fixed-value-check" {
  ...
  strategy "fixed-value" {
    value = 3
  }
  ...
  • value (int: <required>) - The value used by the Nomad Autoscaler to set the target count.

»Pass-Through Strategy Plugin

The pass-through strategy is a very simple, yet useful strategy. It does not add any extra computation on top of the metric query result, and instead uses the APM query result as the scaling count. It doesn't have any configuration options.

This allows the Nomad Autoscaler to be integrated into systems where the scaling computation is done externally like an edge router, or easily derived from a query such as running one allocation per item in a queue.

»Agent Configuration Options

strategy "pass-through" {
  driver = "pass-through"
}

»Policy Configuration Options

check "pass-through-check" {
  ...
  strategy "pass-through" {}
  ...

»Dynamic Application Sizing Average Strategy Plugin

Enterprise

This functionality only exists in Nomad Autoscaler Enterprise. This is not present in the open source version of Nomad Autoscaler.

The app-sizing-avg plugin calculates the average value seen across the dataset. The plugin applies an exponential weight decay to data, in order to give more significance to recent data over older data.

This plugin is only recommended for CPU values of workloads with very stable resource usage levels, such as batch jobs.

»Agent Configuration Options

The app-sizing-avg plugin is automatically launched by Nomad Autoscaler Enterprise and so the following setup is optional.

strategy "app-sizing-avg" {
  driver = "app-sizing-avg"
}

»Policy Configuration Options

check "avg" {
  strategy "app-sizing-avg" {}
}

»Dynamic Application Sizing Max Strategy Plugin

Enterprise

This functionality only exists in Nomad Autoscaler Enterprise. This is not present in the open source version of Nomad Autoscaler.

The app-sizing-max plugin calculates the maximum value seen for the target resource within the available dataset. This plugin is ideally suited for memory resources since workloads don’t release their memory too often and underprovisioning could cause OOM errors.

»Agent Configuration Options

The app-sizing-max plugin is automatically launched by Nomad Autoscaler Enterprise and so the following setup is optional.

strategy "app-sizing-max" {
  driver = "app-sizing-max"
}

»Policy Configuration Options

check "max" {
  strategy "app-sizing-max" {}
}

»Dynamic Application Sizing Percentile Strategy Plugin

Enterprise

This functionality only exists in Nomad Autoscaler Enterprise. This is not present in the open source version of Nomad Autoscaler.

The app-sizing-percentile plugin calculates its result based on a desired percentile value from the dataset.

The plugin applies an exponential weight decay to data, in order to give more significance to recent data over older data. It also adjusts its calculation based on the amount of resources used per unit of time. This load-adjusted calculation results in values that are more likely to actually meet the usage needs of the workload when compared to the traditional time-based percentile calculation.

This Dynamic Application Sizing plugin is the most versatile, since the percentile level can be fine-tuned as needed. If your workload can withstand occasional OOM errors gracefully, using a 98th percentile for memory instead of app-sizing-max could result in smaller recommendations and subsequently more resource availability for other tasks. A 95th to 90th percentile for CPU could have the same effect.

»Agent Configuration Options

The app-sizing-percentile plugin is automatically launched by Nomad Autoscaler Enterprise and so the following setup is optional.

strategy "target-value" {
  driver = "target-value"
}

»Policy Configuration Options

check "p95" {
  strategy "app-sizing-percentile" {
    percentile = "95"
  }
}
  • percentile (int: 99) - Specifies the percentile value to use when performing the strategy calculation.