The pay-as-you-go billing method allows you to pay for resources after they are used. If you use the pay-as-you-go billing method, you pay only for the Function Compute resources that you use. You do not need to purchase resources in advance. This topic describes the resources that support the pay-as-you-go billing method and the billing rules of the pay-as-you-go billing method.
Applicable billable items
Starting from November 1, 2022, the original resource usage billing by memory usage is changed to vCPU and memory usage. You can flexibly configure the vCPU and memory specifications. The vCPU-to-memory ratio (vCPUs:GB) must be from 1:1 to 1:4.
All billable items in Function Compute support the pay-as-you-go billing method, including the following items:
Number of function requests
Resource usage
GPU
Active vCPU
Idle vCPU
Memory
Disk
Outbound Internet traffic
For more information, see Billing overview.
Billing granularity
The following table describes the billing granularities of different types of instances based on the execution duration of the instances.
Instance type | On-demand mode | Provisioned mode |
Elastic instance | The billing granularity is 1 millisecond. | The billing granularity is seconds. Execution durations that are not tens are rounded up to the nearest tens. Note For example, if the execution duration of a provisioned instance is 51 seconds, you are charged for 60 seconds. If the execution duration is 61 seconds, you are charged for 70 seconds. |
GPU-accelerated instance | The billing granularity is seconds. Partial seconds are rounded up to full seconds for billing. Note For example, if the execution duration of an on-demand GPU-accelerated instance is 51 milliseconds, you are charged for 1 second. If the execution duration is 10.5 seconds, you are charged for 11 seconds. |
Execution duration refers to the execution period of a function.
Billing cycle
The bill is calculated on an hourly basis. After each billing cycle, the bill is generated and sent to your account after three to four hours. The actual time when the bill is sent is determined by the system. Fees are automatically deducted from your account.