New Feature: Target Tracking for Elastigroups - Spot.io

New Feature: Target Tracking for Elastigroups

Reading Time: 2 minutes

Use Target tracking to easily manage the scaling of your Spot Instances

Deciding what scaling policies can be an unnecessary pain when all you really want is to optimize your policies for a specific metric. For some of us, since AWS announced target tracking, it has quickly become a norm. Why set multiple scaling policies for when to scale up or down when you could just optimize to keep your CPU utilization or incoming traffic at a specific level?

Well now, this same magic is available for Elastigroup. Using target tracking to set your autoscaling policies simplifies how you configure dynamic scaling policies in Elastigroup. Just assign a metric that best describes the load of your application, and set a target value. From here, Elastigroup takes over and manages your capacity for you, forever keeping your desired metric at the selected target value. Your Elastigroup will dynamically create scaling policies for you in real time to ensure your target metric stays at (or close to) the specified target value. Just tell us where your application’s performance sweet spot is and Elastigroup will move heaven and earth to keep it there for you. Scale up fast when demand is high and release unused resources when the time is right. Keeping your cluster performing optimally reduces your compute cost, which is what we’re all about.

Some examples of how you can use target tracking:

  • Configure a target tracking scaling policy to keep the average aggregate CPU utilization of your Elastigroup instances at 50%.
  • Configure a target tracking scaling policy to keep the incoming traffic at 1000000 bytes per second to each of your instances.

Which Target Tracking metrics should I use?

When assigning a metric, it’s important to note that not all metrics are suitable for target tracking scaling policies. The metric must be a valid utilization metric that describes how ‘busy’ an instance is running your workload. Essentially, the metric value must be affected by a number of instances in your Elastigroup with a proportional correlation to your application’s load, so that the metric data can be used to scale out or in the number of instances.

For example, the CPU utilization of an Auto Scaling group (that is, the Amazon Cloudwatch metric CPUUtilization) works if the load on the Auto Scaling group is distributed evenly across the instances.

Configuration

Spotinst allows you to easily configure a target tracking scaling policy for your Elastigroup through our console. Just click on the ‘scaling’ tab to find this new scaling policy. Select a metric from the predefined options, input the target value and you’re ready to go.

"scaling": {
      "target": [
        {
          "policyName": "Target_tracking_55",
          "namespace": "AWS/EC2",
          "source": "cloudWatch",
          "metricName": "CPUUtilization",
          "statistic": "average",
          "unit": "percent",
          "target": 53,
          "cooldown": 180
        }
      ]
    }

Food For Thought

It’s worth mentioning that some experimentation is required to achieve the right target value. We encourage you to test your target value in order to find that sweet balance between over-provisioning and cost optimization.

Our aim is to simplify the scaling configuration for you, leaving you to continue developing your application’s logic. Target tracking scaling policies we think, adds lightness to the tedious process of maintaining an optimized compute cluster. So keep it even simpler, and set a target tracking policy to replace your current scaling policies!