All Products
Search
Document Center

Overview

Last Updated: Mar 09, 2021

This topic describes the billable resources and corresponding billing methods of Elastic Container Instance.

Overview

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

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

    • Billed by vCPUs and memory

    • Billed by Elastic Compute Service (ECS) instance types

  • Image caches: If you use the image cache feature, you are charged for the creation and usage of image caches.

  • Other resources:

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

    • Storage: If persistent storage is required, you can attach disks, Apsara File Storage NAS (NAS) file systems, and Object Storage Service (OSS) buckets to your elastic container instances as volumes. You are charged for storage resources based on the selected storage services.

Billing of elastic container instances

Elastic Container Instance is billed on a pay-as-you-go basis, which allows you to use resources before you pay for them. Bills are accurate to seconds and generated by hour. The billing duration starts from the download of container images (Pending) and ends when the elastic container instance stops running (Succeeded or Failed).

Note

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

If the total value of your Alibaba Cloud account balance and vouchers is less than the required payment, 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 to avoid your business being affected by the release of resources.

One of the following billing modes applies based on how you create an elastic container instance:

  • Billed by vCPUs and memory

    You are charged based on the vCPUs and memory that you specify when you create the elastic container instance. For vCPUs and memory specifications that are not supported, the system adjusts the specifications and bills based on the adjusted specifications. For more information, see Create an elastic container instance with the specified CPU and memory resources.

    The fee is calculated based on the following formula: Fee = (Number of vCPUs × Unit price of vCPUs + Memory size × Unit price of memory) × Running duration of elastic container instances.

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

    • Unit price of vCPUs (vCPU):USD 0.0000077 per second

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

  • Billed by ECS instance types

    You are charged based on the ECS instance type that you specify when you create an elastic container instance. You can specify the ECS instance family to be used by the elastic container instance to grant the corresponding capabilities. For example, you can use the ECS instance family ecs.sn1ne to grant the elastic container instance enhanced network performance. For more information, see Create an elastic container instance of the specified ECS instance type.

    Note

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

    The fee is calculated based on the following formula: Fee = Unit price of ECS instance types × Running duration of elastic container instances.

    In this mode, the prices of the same ECS instance type in different regions may differ. For more information, see ECS pricing page.

We recommend that you select the vCPU and memory mode. In this mode, multiple ECS instance families can be used to create elastic container instances to ensure resource delivery. For example, if you request 2 vCPUs and 4 GiB memory for an elastic container instance, Elastic Container Instance tries multiple instance types such as ecs.c6.large, ecs.c5.large, ecs.sn1ne.large, and ecs.sn1.large to ensure resource delivery.

Notice

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

For different business loads, 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

Reference

Savings plan

A discount plan that is used together with pay-as-you-go elastic container instances. It is suitable for stable services that run 24/7 long-term. Savings plans have a slightly higher cost than reserved instances but are not limited by regions or instance families, which makes savings plans more flexible.

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

Note

Savings plans can be divided into the general-purpose and ECS compute types. ECS compute savings plans can be used to offset bills only of elastic container instances created by using specified ECS instance types. General-purpose savings plans are not limited.

Reserved instance

A deduction coupon. Reserved instances are used together with pay-as-you-go elastic container instances and suitable for stable services that run 24/7 long-term and require resource assurance. The costs of reserved instances are close to those of ECS instances of the corresponding instance types. You must adhere to the matching rules when you use reserved instances.

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

Note

Reserved instances can be used to offset bills of only elastic container instances created by using specified ECS instance types. Reserved instances can only be used when they can match the specified ECS instance types.

Preemptible instance

An on-demand instance that is suitable for task-based computing scenarios that have short runtimes. The costs of preemptible instances offer more discounts than those of pay-as-you-go instances. However, prices are susceptible to changes in supply and demand. After the protection period expires, preemptible instances may be released due to insufficient 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

Image caches can be used to accelerate image pulling and reduce the startup time of elastic container instances. You are charged for creating and using image caches when you use the image cache feature.

  • Creation billing

    • Billing of elastic container instances and disks

      The system creates an elastic container instance that has the specifications of 2 vCPUs and 4 GiB memory and a PL1 enhanced SSD (ESSD) for intermediation when you create an image cache. After the image cache is created, the elastic container instance and the disk are automatically released and the billing is stopped.

      Fee = (2 × Unit price of vCPUs + 4 × Unit price of memory + Disk capacity × Unit price of disks) × Running duration of elastic container instances. The disk capacity is the size of the specified image cache. The running duration of the elastic container instance increases together with the image size.

    • Billing of snapshots

      The system creates an image cache snapshot based on the disk. You are charged for the capacities and usage duration of snapshots. 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 the snapshot bills. For more information, see Snapshots.

      Fee = Unit price of snapshots × Snapshot capacity × Usage duration. The snapshot capacity is the size of the specified image cache. The usage duration is the amount of time for which the image cache is retained.

  • Usage billing

    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 a snapshot of the image cache. The capacity of the disk is the same as that of the snapshot. The disk is created and released together with the elastic container instance.

    This means that if you use the image cache feature to create an elastic container instance, you are charged for the disk in addition to the elastic container instance itself.

    Fee = Disk capacity × Unit price of disks × Running duration of elastic container instances.

Note

The unit prices of disks and snapshots may differ in different regions. For more information, see the EBS pricing page.

Billing of other resources

You may need to use network and storage services provided by Alibaba Cloud based on your business needs. The following tables describe the services and corresponding billing rules.

  • Network

    If your elastic container instances need Internet access, you must configure EIPs or NAT gateways for the elastic container instances. You are charged for the relevant resources.

    Billable resource

    Description

    Reference

    EIP

    A separate public IP address that can be purchased and managed independently to enable Internet access for bound elastic container instances.

    Billing

    NAT gateway

    A gateway that can be purchased independently. After you bind an EIP to a NAT gateway, the EIP and NAT gateway can enable Internet access for all elastic container instances in the associated VPC.

    Billing overview

  • Storage

    If persistent storage is required, you can attach disks, NAS file systems, and OSS buckets to your elastic container instances. You are charged for storage resources based on the selected storage services.

    Billable resource

    Description

    Reference

    Disk

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

    Elastic Block Storage devices

    NAS file system

    A scalable distributed file system that provides shared access.

    Billing of General-purpose NAS file systems

    OSS bucket

    A huge storage space designed to store data on the Internet, such as images and videos.

    Overview