Elastic Compute Service (ECS) instance types are billed based on the computing resources (vCPUs and memory) that the instance types offer. This topic describes the billing methods of instance types, comparison of these billing methods, and how to choose billing methods for various scenarios.

Billing overview

Instance types are billed based on computing resources: vCPUs and memory. Prices of an instance type may vary by region. For more information, visit the Pricing tab on the Elastic Compute Service product page.
Important Computing resources are the basic resources of instances. You are charged for the computing resources used by your pay-as-you-go instances throughout the lifecycle of the instances regardless of whether the instances are running. However, if you stop a pay-as-you-go instance in economical mode, you are no longer charged for the computing resources used by the instance when the instance is stopped. For more information, see Economical mode.

Billing methods

The following table compares the billing methods that instance types support.
Billing method Scenario Description Billing rule or payment option Cost-effectiveness
Subscription Subscription instances are suitable for services that run 24/7, such as web services and databases. A billing method that allows you to use resources only after you pay for them. Instance type fee = Unit price of an instance type × Subscription duration. Subscription prices are much lower than pay-as-you-go prices for resources.
Pay-as-you-go Pay-as-you-go instances are suitable for services that experience spikes in traffic, such as temporary scaling, interim testing, and scientific computing. A billing method that allows you to use resources first and pay for them afterwards. Instance type fee = Unit price of an instance type × Billing duration.

The billing duration is accurate to the second, and bills are generated per hour.

Pay-as-you-go prices are higher than prices that apply when other billing methods are used for resources.
Preemptible instances Preemptible instances are suitable for services that experience spikes in traffic, such as temporary scaling, interim testing, and scientific computing. Preemptible instances are on-demand instances that are created in spare ECS capacity. They are offered at steep discounts compared with pay-as-you-go instances and may be reclaimed by Alibaba Cloud with a short notice. The prices of preemptible instances fluctuate in response to changes in supply and demand. You are charged based on the actual usage duration of instances. The instance type of a preemptible instance is billed in 1-second increments per hour. You pay for the instance after you use it. The prices of preemptible instances fluctuate in response to changes in supply and demand and can be discounted up to 90% off pay-as-you-go prices.
Reserved instances Reserved instances are used to offset bills of pay-as-you-go instances, and are suitable for web services and databases. Reserved instances are discount coupons that can be applied to pay-as-you-go instances to offer savings over pay-as-you-go pricing.

The price of each reserved instance is determined based on the region, instance type, operating system, payment option, duration, and instance quantity.

Reserved instances offer discounts over pay-as-you-go pricing in exchange for a commitment for using specified resources over a specific period of time. Reserved instances can be applied only to pay-as-you-go instances that match the attributes of the reserved instances.

You can choose the All Upfront, Partial Upfront, or No Upfront payment option. Reserved instances offer billing discounts for pay-as-you-go instances. The discounted prices are close to those of subscription instances.
Savings plans Savings plans are used to offset the bills of pay-as-you-go instances, and are suitable for web services and databases. Savings plans are discount plans that can be applied to pay-as-you-go instances in exchange for a usage commitment.

The price of each savings plan is determined based on the hourly usage commitment, payment option, and duration.

The billing discount that a purchased savings plan can offer is determined based on the savings plan type, payment option, duration, and attributes of eligible pay-as-you-go instances such as region and instance type.

Savings plans offer discounts over pay-as-you-go pricing in exchange for a commitment to a consistent amount of usage and are applied to pay-as-you-go instances regardless of region and instance family.

You can choose the All Upfront, Partial Upfront, or No Upfront payment option. Savings plans offer billing discounts for pay-as-you-go instances and are more flexible to use. They are priced slightly higher than reserved instances.
Note You can purchase both reserved instances and savings plans. Reserved instances take precedence over savings plans to offset the bills of pay-as-you-go instances.

Billing examples

The following table provides examples on how to calculate the fees for an instance type. Assume that you created an ecs.g7.large instance in the China (Hangzhou) region.
Note
  • The prices in the table are for reference only. Prices displayed on the Pricing tab on the Elastic Compute Service product page prevail.
  • The table describes the fees for the instance type, excluding fees for the image, Elastic Block Storage (EBS) devices, public bandwidth, and snapshots.
Billing method Billable item Fee (USD)
Subscription
  • Unit price for the ecs.g7.large instance type: USD 69.21 per month
  • Subscription duration: one month
Instance type fee = Unit price of the instance type × Subscription duration = 69.21 × 1 = 69.21
Pay-as-you-go
  • Unit price for the ecs.g7.large instance type: USD 0.1188 per hour
  • Billing duration: 24 hours
Instance type fee = Unit price of the instance type × Billing duration = 0.1188 × 24 = 2.8512

Examples of typical scenarios

The following figure shows some typical scenarios to which you can refer to choose appropriate billing methods. Scenarios of instance billing
Business type Business characteristic Example scenario Recommended billing method
Linked pattern All business segments are closely linked. When the traffic loads of one business segment increase, the traffic loads of other business segments also increase. Hot news, e-commerce promotions, and spikes in traffic of IoT. Pay-as-you-go and savings plans (or reserved instances).
Stable pattern Business loads are stable with no obvious peak hours or off-peak hours. Stable online business, such as internal office automation (OA) systems.
  • Subscription.
  • Pay-as-you-go and savings plans (or reserved instances).
Burstable pattern All business segments are loosely linked. Business loads may burst at some points in time. Event-based tasks, job tasks, and simulation tasks. Pay-as-you-go.

You can combine the pay-as-you-go billing method with savings plans or reserved instances if traffic bursts frequently occur.

Hybrid pattern A variety of business segments exist. Requirements for computing power of each business segment have different priorities and vary at different points in time. Scenarios where online, offline, and job tasks are deployed in a hybrid manner and where multiple environments are used alternately, such as blue-green deployment. Pay-as-you-go and savings plans (or reserved instances).

Recommended combinations of billing methods

You can mix and match billing methods for ECS instances to achieve the perfect blend of performance and costs tailored towards your use cases. The following figure shows the recommended combinations of billing methods. Combination of billing methods
If your business loads are stable, you can use subscription instances, reserved instances, or savings plans to reduce costs. When durations are the same, savings plans provide the most flexibility, followed by reserved instances and then subscription instances. The following table describes the comparison of subscription, reserved instances, and savings plans.
Item Subscription Reserved instance Savings plan
Limits on discounts Discounts are applicable only to the instance that you purchase. A reserved instance can match up to 100 pay-as-you-go instances to offer discounts. Savings plans are used to offset bills without a limit on the number of instances.
Resource reservation Supported. Supported. A zonal reserved instance can reserve resources within a specific zone. Not supported.
Use across services Not supported. Supported. Reserved instances can be applied to both ECS instances and elastic container instances. Supported. Savings plans can be applied to both ECS instances and elastic container instances.
Use across regions Not supported. Not supported. Supported. General-purpose savings plans can be used across regions.
Use across zones within the same region Not supported. Supported. Regional reserved instances can be used across different zones within the same region. Supported.
Use across different instance families Not supported. Not supported. Supported. General-purpose savings plans can be used across different instance families.
Use across different instance types in the same instance family Not supported. Supported. Supported.
Use across different operating systems Not supported. Not supported. Supported.
Use across different accounts based on established trusteeship Not supported. Supported. Supported.
Installment Not supported. Supported. You can choose the All Upfront, Partial Upfront, or No Upfront payment option. Supported. You can choose the All Upfront, Partial Upfront, or No Upfront payment option.

Switch between billing methods

You can change the billing method of an instance from subscription to pay-as-you-go or from pay-as-you-go to subscription.