All Products
Search
Document Center

Billing

Last Updated: Oct 18, 2021

This topic describes billable Elastic Container Instance resources and their billing methods.

Introduction

When you use Elastic Container Instance, you are charged for the following resources:

  • Elastic container instances: You are charged for compute resources on a pay-as-you-go basis. The following billing methods are supported:

    • Billing based on vCPU and memory specifications

    • Billing based on Elastic Compute Service (ECS) instance types

  • Image caches: You are charged for the creation and use of image caches when you use the image cache feature.

  • Other resources:

    • Network: If your elastic container instances require Internet access, you must configure elastic IP addresses (EIPs) or NAT gateways for the elastic container instances. You are charged for their corresponding network usage.

    • Storage: If you need to add temporary storage space for your elastic container instances or persistently store data on your elastic container instances, you can attach disks and mount an Apsara File Storage NAS (NAS) file system to your elastic container instances. You are charged for the storage resources that you use.

Billing of elastic container instances

Elastic container instances are billed on a pay-as-you-go basis. This allows you to use resources before you pay for them. Bills are accurate to seconds and generated by hour. The billing duration of an elastic container instance begins when the container images are downloaded and ends when the instance stops running. When the container images are being downloaded, the instance is in the Pending state. When the instance stops running, the instance enters the Succeeded or Failed state.

Note

You are not charged for elastic container instances that fail to be created or started. For more information, see Elastic container instance lifecycle.

If the available credit (the total value of your account balance and payment instruments such as vouchers) within your Alibaba Cloud account is less than the payable amount, your account is deemed to have an overdue payment. This may cause your elastic container instances to be released. When you use Elastic Container Instance, make sure that you have sufficient credit in your account so that your business is not affected by instance releases due to overdue payments.

One of the following billing methods applies based on how you create elastic container instances:

  • Billing based on vCPU and memory specifications

    In this method, you are charged for elastic container instances based on the vCPU and memory specifications that you specify when you create the elastic container instances. If the vCPU and memory specifications that you specify are not supported, the system automatically adjusts the specifications and charges you based on the adjusted specifications. For more information, see Specify the number of vCPUs and memory size to create an elastic container instance.

    The fees for an elastic container instance are calculated based on the following formula: (Number of vCPUs × Unit price of vCPUs + Memory size × Unit price of memory) × Running duration of the elastic container instance.

    The following list provides the unit prices of vCPUs and memory in this mode. The actual information displayed on the instance buy page prevails.

    • Unit price of vCPUs: USD 0.0000077 per second

    • Unit price of memory (GiB): USD 0.00000096 per second

  • Billing based on ECS instance types

    In this method, you are charged for elastic container instances based on the ECS instance types that you specify when you create the elastic container instances. When you create elastic container instances, you can specify ECS instance families based on your business requirements. For example, you can specify the ecs.sn1ne instance family to create elastic container instances that provide enhanced network performance. For more information, see Specify an ECS instance type to create an elastic container instance.

    Note

    Elastic Container Instance supports GPUs. GPU-accelerated elastic container instances are billed based on the GPU-accelerated ECS instance types that you specify when you create the elastic container instances. For more information, see Create a GPU-accelerated elastic container instance.

    The fees for a GPU-accelerated elastic container instance are calculated based on the following formula: Unit price of ECS instance types × Running duration of the GPU-accelerated elastic container instance.

    In this method, the price of each ECS instance type may vary based on the region. For more information, see the pricing tab on the Elastic Compute Service page.

We recommend that you create elastic container instances by specifying vCPU and memory specifications. This way, the system tries instance types from various ECS instance families that have the specified vCPU and memory specifications to create an elastic container instance. This ensures that sufficient resources are available to create the elastic container instances. For example, if you want to create an elastic container instance that has two vCPUs and 4 GiB of memory, the system tries multiple ECS instance types such as ecs.c6.large, ecs.c5.large, ecs.sn1ne.large, and ecs.sn1.large based on resource availability to create the elastic container instance.

Notice

Each elastic container instance is billed based on your requested resources instead of the actual vCPU utilization and memory usage. For example, you create an elastic container instance that has two vCPUs and 4 GiB of memory. The average vCPU utilization of the instance is 20% and the memory usage is 60%. The instance is billed based on the specifications of two vCPUs and 4 GiB memory, instead of the vCPU utilization and memory usage.

For different business workloads, you can use a combination of savings plans, reserved instances, and preemptible instances to optimize your instance usage costs.Billing options

The following table describes the billing options.

Billing option

Description

References

Savings plan

A discount plan that can be used together with pay-as-you-go elastic container instances. Savings plans are suitable for stable services that run 24/7 over a long period of time. Savings plans have a slightly higher cost than reserved instances but are more flexible because savings plans are not limited by regions or instance families.

The prices of savings plans are determined based on the committed hourly consumption, payment method, and subscription duration. Savings plans offset bills based on the committed consumption amount.

Note

Savings plans are categorized into general-purpose and ECS compute types. ECS compute savings plans can be applied only to the elastic container instances that are created by using specified ECS instance types. General-purpose savings plans have no limits on ECS instance types.

Reserved instance

A discount coupon that can be used together with pay-as-you-go elastic container instances. Reserved instances are suitable for stable services that run 24/7 over a long period of time and require reserved resources. The cost of a reserved instance is similar to the cost of a subscription ECS instance of the same instance type. You must follow specific rules to use reserved instances.

The prices of reserved instances are determined based on the region, instance type, operating system, payment method, and term. Reserved instances offset bills based on the committed resource consumption.

Note

Reserved instances can be applied only to elastic container instances that are created by using specified ECS instance types. Reserved instances can be applied only if they are matched to elastic container instances.

Preemptible instance

A type of on-demand instance that is suitable for task-based computing scenarios that have a short runtime. The costs of preemptible instances are significantly lower than the costs of pay-as-you-go instances. However, the prices of preemptible instances change based on the supply and demand of resources. After the protection period ends, the preemptible instances may be released due to insufficient resource inventory or lower bids than the market price.

Note

You can purchase both savings plans and reserved instances. Reserved instances are preferentially used to offset bills.

Billing of image caches

You can use image caches to accelerate image pulling and reduce the startup time of elastic container instances. For information about how to create and use an image cache, see Use an image cache to create an elastic container instance.

You are charged for the creation and use of image caches when you use the image cache feature. The following section describes the details about billable items:

  • Billing for creating image caches

    • Billing of an elastic container instance and a disk

      When you create an image cache, the system creates an intermediate performance level-1 (PL1) enhanced SSD (ESSD) and an intermediate elastic container instance that has two vCPUs and 4 GiB of memory. After the image cache is created, the instance and the ESSD are automatically released and no longer billed.

      The fees for the instance and the ESSD are calculated based on the following formula: (2 × Unit price of vCPUs + 4 × Unit price of memory + ESSD capacity × Unit price of ESSDs) × Running duration of the elastic container instance. The ESSD capacity is equal to the image cache size. The running duration of the instance increases with the image size.

    • Billing of snapshots

      The system creates a regular snapshot for an image cache based on the intermediate ESSD. You are charged for the regular snapshot based on its size and usage duration. By default, the pay-as-you-go billing method is used. You can use OSS storage plans together with storage capacity units (SCUs) to offset snapshot bills. For more information, see Snapshots.

      Snapshot fees are calculated based on the following formula: Unit price of regular snapshots × Snapshot size × Usage duration of the snapshot. The snapshot size is equal to the image cache size. The usage duration is equal to the retention duration of the image cache.

    • Billing of the instant access feature for snapshots

      After the instant image cache feature is enabled, the system immediately creates a temporary local snapshot by using the instant access feature. You are charged for the instant access feature based on the number of times that the feature is enabled and for the local snapshot based on its size and usage duration.

      Local snapshot fees are calculated based on the following formula: 1 × Price for enabling the instant access feature once + Unit price of local snapshots × Size of the local snapshot × Usage duration of the local snapshot. The local snapshot size is equal to the specified image cache size. The usage duration of the local snapshot begins when the snapshot is created and ends when the snapshot is automatically deleted. The usage duration increases with the total image size.

      Note

      After the local snapshot is created, the system begins to create a regular snapshot. After the regular snapshot is created, the system deletes the local snapshot.

  • Billing for the use of image caches

    If you use the image cache feature when you create an elastic container instance, the system attaches a PL1 ESSD to the elastic container instance. The ESSD is generated based on the snapshot of the image cache. The ESSD capacity is equal to the snapshot size. The ESSD is created and released together with the elastic container instance.

    If you use the image cache feature to create an elastic container instance, you are charged for the ESSD and the elastic container instance.

    The fees for the ESSD are calculated based on the following formula: ESSD capacity × Unit price of ESSDs × Running duration of the elastic container instance.

Note

The unit prices of ESSDs and snapshots vary based on the region. For more information, see the Elastic Block Storage pricing tab on the Elastic Compute Service page.

Billing of other resources

You may need to use the network and storage services provided by Alibaba Cloud. The following tables describe the billable resources of these services and their billing rules.

  • Network

    If your elastic container instances require Internet access, you must configure EIPs or NAT gateways for the elastic container instances. You are charged for the corresponding network usage.

    Billable resource

    Description

    References

    EIP

    A public IP address that can be separately purchased and managed to enable Internet access for associated elastic container instances.

    Billing overview

    NAT gateway

    A gateway that can be separately purchased. After you associate an EIP with a NAT gateway, the EIP and NAT gateway can provide Internet access for all elastic container instances within the associated VPC.

    Billing overview

  • Storage

    If you need to add temporary storage space for your elastic container instances or persistently store data on your elastic container instances, you can attach disks and mount a NAS file system to your elastic container instances. You are charged for the storage resources that you use.

    Billable resource

    Description

    References

    Disk

    A block device at the data block level. A disk is similar to a physical device. You can partition and format a disk and create file systems for it.

    Elastic Block Storage devices

    NAS file system

    A scalable and distributed file system that provides shared access.

    Billing of General-purpose NAS file systems

    OSS bucket

    A container that provides a large amount of storage space to store data such as images and videos on the Internet.

    Overview