The cost estimation feature of Auto Scaling helps you estimate the costs of using Elastic Compute Service (ECS) instances in scaling groups. Before you purchase resources or deploy your application, you can build a model based on your business workloads to estimate the costs of using Alibaba Cloud resources. This way, you can identify the most appropriate purchasing method for the Alibaba Cloud resources that meet your business requirements. This topic describes how to use the cost estimation feature to estimate resource costs.
Feature description
The cost estimation feature of Auto Scaling is a calculator that you can use to estimate the costs of using ECS instances on a monthly basis. After you create a model based on your business workloads, the cost estimation feature provides information about the estimated costs of using ECS instances per month and the cost savings ratio of subscription instances to pay-as-you-go instances.
You can enable the cost estimation feature only for scaling groups of the ECS type.
Procedure
In this example, the Workload Type parameter is set to Daily Peak Traffic and the Billing Method parameter is set to Pay-as-you-go.
Log on to the Auto Scaling console.
In the top navigation bar, select a region.
In the left-side navigation pane, click Scaling Groups.
In the upper-left corner of the Scaling Groups page, click Estimate Cost.
On the Estimate Cost page, configure the Workload Type parameter based on your business requirements.
The Workload Type parameter specifies the amount of required resources based on your business requirements. We recommend that you configure this parameter based on your business workloads.
Parameters vary based on the workload types.
Daily peak traffic
The following table describes the parameters that are displayed if you set the Workload Type parameter to Daily Peak Traffic.
Parameter
Description
Example
Days
Specify the days for which you want to estimate the amount of required resources. You can select one or more days from Monday to Sunday.
Monday, Tuesday, and Wednesday
Number of Instances that Workload Demands
Specify the number of instances that are required during peak hours and off-peak hours.
Number of Instances Required During Off-peak Periods: Enter the minimum number of instances that are required during off-peak hours.
Number of Instances Required During Peak Periods: Enter the maximum number of instances that are required during peak hours.
NoteThe value of the Number of Instances Required During Off-peak Periods parameter cannot be greater than the value of the Number of Instances Required During Peak Periods parameter.
Number of Instances Required During Off-peak Periods: 5
Number of Instances Required During Peak Periods: 10
Duration with Peak Traffic
Specify the period of time that is required by your instances to handle peak traffic. The value can be accurate to minutes.
8 Hours and 30 Minutes
Weekly peak traffic
The following table describes the parameters that are displayed if you set the Workload Type parameter to Weekly Peak Traffic.
Parameter
Description
Example
Number of Instances that Workload Demands
Specify the number of instances that are required during peak hours and off-peak hours.
Number of Instances Required During Off-peak Periods: Enter the minimum number of instances that are required during off-peak hours.
Number of Instances Required During Peak Periods: Enter the maximum number of instances that are required during peak hours.
NoteThe value of the Number of Instances Required During Off-peak Periods parameter cannot be greater than the value of the Number of Instances Required During Peak Periods parameter.
Number of Instances Required During Off-peak Periods: 1
Number of Instances Required During Peak Periods: 2
Duration with Peak Traffic
Specify the period of time that is required by your instances to handle peak traffic. The value can be accurate to seconds.
NoteThe period of time cannot exceed seven days.
3 Days, 0 Hours, and 0 Minutes
Monthly peak traffic
The following table describes the parameters that are displayed if you set the Workload Type parameter to Monthly Peak Traffic.
Parameter
Description
Example
Number of Instances that Workload Demands
Specify the number of instances that are required during peak hours and off-peak hours.
Number of Instances Required During Off-peak Periods: Enter the minimum number of instances that are required during off-peak hours.
Number of Instances Required During Peak Periods: Enter the maximum number of instances that are required during peak hours.
NoteThe value of the Number of Instances Required During Off-peak Periods parameter cannot be greater than the value of the Number of Instances Required During Peak Periods parameter.
Number of Instances Required During Off-peak Periods: 1
Number of Instances Required During Peak Periods: 2
Duration with Peak Traffic
Specify the period of time that is required by your instances to handle peak traffic. The value can be accurate to minutes.
NoteThe period of time cannot exceed 31 days.
8 Days, 0 Hours, and 0 Minutes
Proceed to configure the following parameters: Billing Method, Zone, and Instance Type.
The following table describes these parameters.
Parameter
Description
Example
Billing Method
You can set the Billing Method parameter to Pay-as-you-go or Preemptible Instance. For more information, see Pay-as-you-go or Preemptible Instance.
Pay-as-you-go
Zone
You can select different zones in the selected region, such as Hangzhou Zone K and Hangzhou Zone J. For more information about zones, see Regions and zones.
Hangzhou Zone K
Instance Type
Different instance types can provide different computing power. You can filter instance types by Instance Type, vCPU, and Memory. Select an instance type based on your business requirements.
ecs.c7.large
Click Calculate to start cost estimation. You can also click Recalculate to re-estimate the costs.
After cost estimation is complete, you can view the details of the estimates, such as the costs of using pay-as-you-go instances, as shown in the following figure.
NoteYou can click How to Estimate the Number of Hours to view how the workload hours are calculated.
You can calculate the cost savings ratio of subscription instances to pay-as-you-go instances by using the following formula:
(Number of subscription instances during peak hours x Unit price per month - Number of working hours of pay-as-you-go instances per month x Unit price per hour)/(Number of instances during peak hours x Unit price per month)