All Products
Search
Document Center

Elastic Container Instance:Use reserved instances

更新時間:Dec 28, 2023

If you run long-lived online applications, we recommend that you use reserved instances to offset the bills of elastic container instances. This topic describes how to use reserved instances to offset the bills of long-lived elastic container instances.

Purchase reserved instances

Reserved instances can match Elastic Compute Service (ECS) instances (excluding preemptible instances) within your account to provide a billing discount. If you specify an ECS instance type to create an elastic container instance, you can use reserved instances to offset the bills of the elastic container instance. For more information, see Reserved instance overview.

Reserved instances can be applied only to elastic container instances that were created by specifying ECS instance types. Before you purchase a reserved instance, take note of the following items:

  • Only some ECS instance types can be used to create elastic container instances. Make sure that the selected ECS instance types suit your business needs. For more information, see Specify ECS instance types to create an elastic container instance.

  • Reserved instances can be applied only to elastic container instances that meet the matching rules. Make sure that your elastic container instances can be matched with the reserved instances.

    Note

    When you purchase reserved instances, you commit to the specified terms and instance types. After a reserved instance is purchased, it automatically matches pay-as-you-go instances that have specific attributes within the term of the reserved instance. You cannot manually manage how the reserved instance is matched to pay-as-you-go instances. After a reserved instance is matched, the system checks for eligible pay-as-you-go instances on an hourly basis and offsets fees based on the computing power of the reserved instance. For more information, see Match between reserved instances and pay-as-you-go instances.

You can purchase and manage reserved instances on the Reserved Instances page in the ECS console. For more information, see Purchase reserved instances.

  • If you want to optimize the costs of existing elastic container instances, you can find elastic container instances that were created by specifying ECS instance types, and purchase reserved instances that can apply to the specified ECS instance types.

  • If you have no existing elastic container instances, select ECS instance types based on your business requirements and purchase reserved instances that can apply to the ECS instance types. Then, create elastic container instances based on the selected ECS instance types.

  • To apply your purchased reserved instances to elastic container instances, you must specify the ECS instance types that match the reserved instances when you create the elastic container instances.

View the offset information of a reserved instance

You can view the billing details of elastic container instances and reserved instances in the Billing Management console.

Important

In scenarios where multiple zones are specified to create elastic container instances, the created elastic container instances may be located in multiple zones. If you find that a reserved instance is not applied to offset bills as expected, check whether the reserved instance and the elastic container instance are within the same zone. If the reserved instance and the elastic container instance are located in different zones of a region, you can change the zonal reserved instance into a regional reserved instance. For more information, see Modify a reserved instance.

  • View bills of elastic container instances

    On the Bill Details page, click the Billing Details tab. You can view the billing details by instance. No bills are generated for the fees of elastic container instances that are offset by reserved instances.

  • View the bill of a reserved instance

    In the left-side navigation pane of the Billing Management console, choose Savings Plan > Manage Reserved Instances. On the Manage Reserved Instances page, select RI for the Resource Type parameter. On the Details tab, you can view the offset information of reserved instances.

    The usage details of reserved instances show which elastic container instances had fees offset by the reserved instances in each billing cycle (hour). The offset duration is calculated by using the following formula: Computing power × Number of hours. Reserved instances are offset by computing power. One unit of computing power is equivalent to one vCPU.