All Products
Search
Document Center

Function Compute (2.0):Pay-as-you-go

Last Updated:Feb 01, 2024

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

All Function Compute billable items support the pay-as-you-go billing method. The following table describes the details.

Category

Billable item

Description

Unit price and example

Function invocations

Number of function invocations

Function invocations are billed in the tired pricing mode.

Resource usage

GPU

You are charged based on the GPU specifications that you configure for the function. GPU usage is billed in the tiered pricing mode.

Note

The billing methods of GPU-accelerated instances in the active state and idle states are different. For more information, see Unit prices.

vCPU

You are charged based on the vCPU specifications that you configure for your function. The vCPU usage is billed in the tiered pricing mode.

Note

The billing methods of active and idle instances are different. For more information, see Unit prices.

Memory

You are charged based on the memory size that you configure for your function.

Disk

You are charged based on the disk specifications that you configure for your function.

Outbound Internet traffic

Outbound Internet Traffic

You are charged based on the total outbound Internet traffic per month.

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 Instances

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.

Note
  • The execution duration refers to the execution time of a function. The execution duration varies based on instance modes. For more information, see Basic terms.

  • The billing cycle is one hour. Fees are settled on an hourly basis based on the corresponding billing granularity.

Billing cycle

Bills are generated on an hourly basis. The billing time is about 1 to 2 hours after the end of the current billing cycle. Fees are automatically deducted from your account.

References