USER MANUALS


Auto scaling guide

In this guide we will explain how to identify the Auto Scaling groups (ASG from now on) associated to your Execution Plane services and give an example of how you can implement automatic scaling.

How to deploy a cluster with Auto Scaling

There are two ways of deploying your Execution Plane in Agora: using predefined templates or manually, through the Manage Environments option. When deploying with templates Agora will automatically create an ASG for each one of your services. If you choose to deploy manually, you can enable the checkbox called Launch instances in Auto Scaling Group in the Load Balancing & Auto Scaling section. This option will deploy the instances in an ASG with maximum, minimum and desired instances as the number of instances defined in the cluster, in this example these values will be set to 6.

Enable Auto Scaling

How to identify the name of the Auto Scaling group

In the overview section of the Solution Manager we can see the cluster summary by clicking on the info button. You could check the Auto Scaling Group name for Virtual DataPort or Data Catalog. In this example we will use Virtual DataPort.

Cluster Summary

Example of automatic scaling configuration

In this section we will walk you through the configuration steps required for implementing an example automatic scaling strategy that achieves the following goals: the combined CPU usage for the instances under the Virtual DataPort ASG should be around 60%, and the number of instances should be lowered on weekends.

The first step is to set the required values for the ASG maximum and minimum settings. Find out the Virtual DataPort ASG like we explained in the previous section. Once you have its name, look for it in the EC2 Auto Scaling Groups section of the AWS Console. As we commented before, it will have minimum, maximum and desired set to 6. Our first step will be to change the minimum and maximum number of instances in the ASG, from 6 to a minimum of 4 and a maximum of 8. This can be done by clicking edit on the group details.

There are 3 different types of scaling policies available in AWS. In this example we will configure a dynamic scaling policy and two scheduled actions. You can check out AWS documentation for more details on how to configure automatic scaling policies.

To configure 60% Average CPU usage:

  1. Go to automatic scaling.

  2. Create a dynamic scaling policy with the following properties:

    1. Set Policy type to Target tracking scaling.

    2. Set Metric type to Average CPU utilization.

    3. Set Target value to 60.

  3. Hit create.

Dynamic Scaling Policy

To configure less instances during weekends:

  1. Create a scheduled action.

  2. Set Desired capacity and Min to 3, and Max to 5.

  3. Set Recurrence to Every week.

  4. Choose your time zone.

  5. Set start date on the next Friday of your calendar.

  6. Set the hour to 22:00.

Scheduled Action

This scheduled action will lower the number of instances every Friday at 22:00, however, we need to restore the parameters for the rest of the week. So we will create another scheduled action:

  1. Create another scheduled action.

  2. Set Desired to 6, Min to 4 and Max to 8.

  3. Set Recurrence to Every week.

  4. Choose your time zone.

  5. Set start date on the next Monday of your calendar.

  6. Set the hour to 06:00.

The dynamic scaling policy will always be enabled. This kind of policy will modify the desired instances of the ASG. However, this parameter is always subject to the min and max. This is why, if you have a dynamic scaling policy, you should only care about modifying min and max when creating scheduled actions. The dynamic scaling policy will be the one in charge of modifying the desired instances in order to maintain average CPU Usage at 60%.

Add feedback