All Products
Search
Document Center

Differences between old and new pricing methods

Last Updated: Jun 22, 2020

Function Compute is billed based on the number of requests, execution duration, amount of Internet downstream transfer, and amount of CDN back-to-origin transfer. Only the execution duration is metered in different ways in Function Compute V1 and V2.

In Function Compute V1, the execution duration of requests is metered. Function Compute sums up the execution duration of all requests under your account, and multiplies it by the specification of the instance that processes the requests. The final value is used to calculate the charges within the current billing cycle. In Function Compute V2, the execution duration of instances is metered. Function Compute sums up the execution duration of all instances under your account, and multiplies it by the specification of the instances. The final value is used to calculate the charges within the current billing cycle. The execution duration of reserved and pay-as-you-go instances is metered using different standards. For more information, see the latest Pricing topic.

In Function Compute V1, the measure unit is GB-second. For example, it takes 3 seconds for an instance with 2 GB of memory to process a request. The amount of resources consumed is 6 GB-second (2 GB × 3 seconds). In Function Compute V2, the measure unit is CU-second. Capacity units (CUs) are units used to measure the computing capabilities of instances. For pay-as-you-go instances, one CU is equivalent to one pay-as-you-go instance with 1 GB of memory. 1 GB-second of resources consumed by a pay-as-you-go instance is equivalent to 1 CU-second of resources.

The following table compares the metering patterns of Function Compute V1 and V2.

Item Function Compute V1 Function Compute V2
Object Request Instance
Unit GB-second CU-second
Subscription Unsupported Supported
Reserved instance Unsupported Supported

Compatibility

Function Compute V1 is billed based on the number of requests. Each request is processed by a dedicated instance. The execution duration of a request equals the execution duration of the instance that processes the request. Therefore, Function Compute V2 complies with the pricing standards of Function Compute V1. Both Function Compute V1 and V2 return the same metering result for a given function.