Set up PerfectScale for Spot
Required permission
- PerfectScale for Spot Manager
PerfectScale for Spot needs access to your AWS account. Make sure to link your AWS account to the DoiT organization if you haven't done so yet.
Link PerfectScale for Spot to your account
To allow PerfectScale for Spot to monitor your ASG behavior and make recommendations, you need to link PerfectScale for Spot to your AWS account and update the associated AWS IAM role.
Linking PerfectScale for Spot to your AWS account doesn't affect your ASG configuration or your workloads. To apply the Spot Instance recommendations, you must use the Apply Recommendations button in the DoiT console or configure the PerfectScale for Spot Auto-Enrollment tags.
-
Sign in to the DoiT console, select Integrate from the top navigation bar, and then select Amazon Web Services.
-
On the Amazon Web Services screen, select the account you would like to use with PerfectScale for Spot.
-
On the account edit screen, select the PerfectScale for Spot checkbox.
-
Select Update account to add PerfectScale for Spot to the account.
You'll be prompted to go to your AWS console to create a CloudFormation stack from a template. After creating the CloudFormation stack, you may have to wait about 30 seconds while we update your account. See Feature permissions: PerfectScale for Spot for more information.
PerfectScale for Spot recommendations in the DoiT console
Once PerfectScale for Spot is linked to your AWS account, you can check recommendations on the PerfectScale for Spot screen in the DoiT console.
View recommendations
To view recommendations, select Optimize from the top navigation bar, and then select PerfectScale for Spot.
The status of each Auto Scaling group is displayed in the Optimization Status column:
-
Optimized: The ASG is fully optimized. All applicable recommendations have been implemented.
-
New recommendations: PerfectScale for Spot has new recommendations. Select the ASG to view the recommendations, modify them as you wish and apply the changes.
-
Not Optimized: The ASG is not optimized and is not benefiting from PerfectScale for Spot recommendations.
-
Error: Something prevents PerfectScale for Spot from working for this ASG. You may need to update your AWS CloudFormation stack. If you get stuck, open a support request.
Modify recommendations
For an un-optimized ASG, you'll see the Current Values of the ASG and the Recommended Values of PerfectScale for Spot.
The current on-demand costs and hours running for that ASG are displayed in the upper-left corner.
You can adjust the following values of a recommendation:
-
On-Demand Base Capacity: The minimum number of instances for the ASG's initial capacity that must be fulfilled by On-Demand Instances.
-
On-Demand Instances: The percentage of On-Demand Instances for anything beyond the base capacity.
-
Spot Instances: The percentage of Spot Instances for anything beyond the base capacity.
-
Allowed Instance Types: The recommended instance types to provision based on the primary instance type.
-
Availability Zones: Balance the instances across the specified Availability Zones for high availability.
Apply recommendations
To reconfigure your ASG according to PerfectScale for Spot's recommendations, select Apply Recommendations.
If successfully:
-
We update your ASG to work in a mixed instances policy and to use a launch template.
-
The Recommended Values column disappears, the values under the Current Values column is updated to reflect the changes.
-
The metrics displayed at the top show the actual cost/hour breakdowns for On-Demand and Spot, as well as the actual savings. You can use the Time Range dropdown in the upper-right corner to adjust the time range for which the metrics are displayed.
-
The ASG has an Optimization status of
Optimized
.
Additional settings
PerfectScale for Spot provides two additional settings:
-
Automatically update: If selected, PerfectScale for Spot will constantly look for savings opportunities and automatically optimize the ASG.
-
Fallback to On-Demand: If selected, when there are not enough EC2 instances to meet the capacity demand for Spot Instances, PerfectScale for Spot will automatically fall back to On-Demand Instances.
Note that the additional settings are not available if you use AWS tags.
AWS tags
PerfectScale for Spot supports the following AWS tags that can be used with Infrastructure as Code (IaC) tools:
-
PerfectScale for Spot Auto-Enrollment:
doitintl:spotscaling:auto-enroll
,doitintl:fallback-to-on-demand
-
Instance distributions:
doitintl:spotscaling:spot-distribution-percentage
,doitintl:spotscaling:on-demand-base-capacity
The AWS tags are ideal for DevOps or Platforms teams that prefer using IaC tools (e.g., Terraform, AWS CloudFormation) to deploy and maintain their cloud infrastructure, instead of having to sign in to the DoiT console.
Tag keys and values are case-sensitive.
PerfectScale for Spot Auto-Enrollment
PerfectScale for Spot Auto-Enrollment is a tool-agnostic solution that allows you to implement PerfectScale for Spot recommendations using IaC tools.
-
Auto-Enrollment tag: to apply PerfectScale for Spot recommendations.
- Key:
doitintl:spotscaling:auto-enroll
- Value: choose one of the following:
always
: Allows PerfectScale for Spot to apply continuous recommendations by finding new savings opportunities when AWS modifies/updates its pricing for the Spot market or when new resources are updated or released.never
: Stops PerfectScale for Spot from applying recommendations.
- Key:
-
Fallback tag: to enable fallback to on-demand.
- Key:
doitintl:fallback-to-on-demand
- Value: choose one of the following:
true
: When there are not enough EC2 instances to meet the capacity demand for Spot Instances, PerfectScale for Spot will automatically fall back to On-Demand Instances.false
: PerfectScale for Spot will not fall back to On-Demand Instances in case of Spot Instance interruptions.
- Key:
Instance distributions
PerfectScale for Spot supports the following AWS tags that you can use for instance purchase options:
-
Instance distribution tag: to specify the the percentage of Spot Instances in the Auto Scaling group for resources beyond the base capacity.
- Key:
doitintl:spotscaling:spot-distribution-percentage
- Value: an integer between 0 to 100
- Key:
-
On-Demand base capacity tag: to specify the minimum amount of the Auto Scaling group's initial capacity that must be fulfilled by On-Demand Instances.
- Key:
doitintl:spotscaling:on-demand-base-capacity
- Value: integer
- Key:
If you don't specify the instance distributions tags, PerfectScale for Spot will use the default setting: 20% On-Demand Instances and 80% Spot Instances.