This topic describes the billing methods and billable resources of Elastic Container Instance (ECI).
Billing methods
You are charged based on the number of ECIs. ECIs are billed in pay-as-you-go mode. Bills are accurate to seconds and generated by hour. The billing duration starts when the external storage is attached or when container images are downloaded through the docker pull command and ends when ECIs stop running and enter the Succeeded or Failed state.
ECI provides reserved instances and preemptible instances to meet workload requirements and reduce costs. They have the following characteristics:
-
Reserved instances: a type of discount coupon applicable to services that run for 24 hours a day and seven days a week, such as Web services. The cost of reserved instances is the same as that of subscription-based Elastic Compute Service (ECS) instances of the same instance type. Compared with pay-as-you-go ECIs, reserved instances help reduce costs by up to 50%. For more information, see Reserved instance overview. For more information about how to use reserved instances, see Reserved instances.
-
Preemptible instances: a type of on-demand ECIs that reduce costs and are applicable to jobs that run for less than 1 hour. Compared with pay-as-you-go ECIs, preemptible instances help reduce costs by 30% to 90%. For more information, see Overview. For more information about how to use preemptible instances, see Preemptible instances.
You can purchase ECIs based on the peak and trough periods of the business to minimize costs.
Billable resources
ECI supports the following two billing modes based on the requested ECI resources:
- ECIs are billed based on the CPU and memory specifications.
- ECIs are billed based on the ECS instance type.
CPU and memory mode
In CPU and memory mode, each ECI is billed based on the requested CPU and memory specifications.
Billing formula: Fee of an ECI = (Number of vCPUs × CPU unit price + Memory size × Memory unit price) × ECI running duration (in seconds). The fee of an ECI less than CNY 0.01 is charged CNY 0.01.
Billing item | Price per second | Price per minute | Price per hour |
---|---|---|---|
CPU (Number of vCPUs) | USD 0.0000077 | USD 0.000462 | USD 0.02772 |
Memory (GB) | USD 0.00000096 | USD 0.0000576 | USD 0.003456 |
The following table compares the price between ECIs and enterprise-level ECS instances of different instance types.
Instance type | ECI hourly price | Hourly price of the fifth-generation enterprise-level ECS instance in the USA () region | Hourly price of the sixth-generation enterprise-level ECS instance in the China (Beijing) region |
---|---|---|---|
1 vCPU and 2 GB memory | USD 0.034632 | N/A | N/A |
1 vCPU and 4 GB memory | USD 0.041544 | N/A | N/A |
1 vCPU and 8 GB memory | USD 0.055368 | N/A | N/A |
2 vCPUs and 2 GB memory | USD 0.062352 | N/A | N/A |
2 vCPUs and 4 GB memory | USD 0.069264 | N/A | CNY 0.39 |
2 vCPUs and 8 GB memory | USD 0.0830088 | USD 0.106 | CNY 0.5 |
2 vCPUs and 16 GB memory | USD 0.110736 | N/A | CNY 0.66 |
4 vCPUs and 4 GB memory | USD 0.124704 | N/A | N/A |
4 vCPUs and 8 GB memory | USD 0.138528 | N/A | CNY 0.78 |
4 vCPUs and 16 GB memory | USD 0.166176 | USD 0.212 | CNY 1 |
4 vCPUs and 32 GB memory | USD 0.221472 | CNY 2.26 | CNY 1.33 |
ECS instance type mode
ECI allows you to request resources based on the ECS instance family. The resources are charged based on . You can specify the ECS instance family to be used by an ECI to grant the ECI specified capabilities. For example, you can use the instance family ecs.sn1ne to grant the ECI enhanced network performance.
Billing formula: Fee of an ECI = specified for the ECI × ECI running duration (in seconds).
GPU
ECI supports graphics processing unit (GPU) instances. The GPU instances are billed based on the price of ECS instances with GPU capabilities. For more information, see Compute optimized instance families with GPU capabilities and the pricing of pay-as-you-go ECS instances in different regions.
If you want to request GPU resources through ECI or Kubernetes clusters, see GPU instances.
Other resources
Network
If your ECI needs to access the Internet, you can associate an Elastic IP Address (EIP) with a network address translation (NAT) gateway in the VPC. For more information about the billing methods of the NAT gateway and EIP, see Billing method and Subscription.
Storage
ECI supports diverse types pf data storage. For more information about the billing rules for each type, see the following links:
Image caches including snapshots and disks
If you use the image cache feature provided by ECI, you are charged for the generated snapshots and occupied storage. For more information about the feature, see Image caches.
- For more information about the billing rules of snapshots, see Snapshot billing.
- If you use the image cache feature to accelerate the creation of an ECI, a snapshot-based disk is required. By default, an ESSD with 20 GB memory is used. For more information about the billing, see .
Billing examples of pay-as-you-go ECIs
Example 1
Assume that you need to run a scheduled task once per hour to process historical data on two ECIs, each ECI has 1 vCPU and 2 GB memory, and ECIs run for 5 minutes each time, that is, 300 seconds.
Fee of an execution
CPU fee of an execution:
- CPU fee of an execution = Number of ECIs × Number of vCPUs per ECI × Price per second of a vCPU × ECI running duration (in seconds)
- CPU fee of an execution = 2 × 1 × CNY 0.000049 × 300 = CNY 0.0294
Memory fee of an execution:
- Memory fee of an execution = Number of ECIs × Memory size (GB) per ECI × Price per GB of memory × ECI running duration (in seconds)
- Memory fee of an execution = 2 × 2 × CNY 0.00000613 × 300 = CNY 0.0074
ECI fee of an execution:
- ECI fee of an execution = CPU fee of an execution + Memory fee of an execution
- ECI fee of an execution = CNY 0.0294 + CNY 0.0074 = CNY 0.04
Monthly ECI fee:
- Monthly ECI fee = ECI fee of an execution × Number of executions in a month
- Monthly ECI fee = CNY 0.04 × (24 × 30) = CNY 28.8
Example 2
Assume that you need to run a statistics report task at 02:00 every day on 10 ECIs, each ECI has 2 vCPUs and 8 GB memory, and ECIs run for an hour each time, that is, 3,600 seconds.
Fee of an execution
CPU fee of an execution:
- CPU fee of an execution = Number of ECIs × Number of vCPUs per ECI × Price per second of a vCPU × ECI running duration (in seconds)
- CPU fee of an execution = CNY 10 × 2 × 0.000049 × 3,600 = CNY 3.528
Memory fee of an execution:
- Memory fee of an execution = Number of ECIs × Memory size (GB) per ECI × Price per GB of memory × ECI running duration (in seconds)
- Memory fee of an execution = CNY 10 × 8 × 0.00000613 × 3,600 = CNY 1.765
ECI fee of an execution:
- ECI fee of an execution = CPU fee of an execution + Memory fee of an execution
- ECI fee of an execution = CNY 3.528 + CNY 1.765 = CNY 5.29
Monthly ECI fee:
- Monthly ECI fee = ECI fee of an execution × Number of executions in a month
- Monthly ECI fee = CNY 5.29 × 30 = CNY 158.7