All Products
Search
Document Center

Function Compute:Pay-as-you-go

Last Updated:Jul 17, 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 settlement rules.

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

Number of function invocations

Number of function invocations

The number of function invocations are billed in the tired pricing mode.

Resource usage

vCPU

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

Note

The billing methods of instances in the active and idle states 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.

Active GPU usage

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

Idle GPU usage

You are charged based on the GPU specifications that you configure for your functions and the total idle duration.

Outbound Internet traffic

Outbound Internet traffic

You are charged based on total outbound Internet traffic.

For more information, see Billing overview.

Billing granularity

The following table describes the billing granularities of execution duration for different types of instances.

Instance type

On-demand mode

Provisioned mode

Elastic Instances

The billing granularity is milliseconds.

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 instances

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.

More information