Pay-as-you-go is a postpaid billing method. There is no need to purchase massive resources in advance. You can activate and release resources on demand anytime and pay for the veFaaS (Function as a Service) resources actually used.
The veFaaS resource billing items are categorized as below:
- Function invocation counts: Billed according to the execution times of function invocation requests. Calculation formula: Invocation count fees = invocation counts x unit price.
- Resource use duration: Billed according to the execution duration of function resources, that is, the time from start to end of function execution. The billing granularity is 1 millisecond; durations less than 1 millisecond are rounded up to 1 millisecond. The function resources are categorized as follows. Each type of resource has different fees:
- Classified by computing power mode:
- GPU instance: a (elastic/reserved) function instance providing GPU computing power based on NVIDIA graphics cards.
- Calculation formula: GPU instance fee = (memory size × memory usage unit price + GPU size × GPU usage unit price) × instance execution duration + invocation counts × invocation unit price + EIP traffic (if any) × unit price
- CPU instance: a (elastic/reserved) function instance paired with vCPU and memory (MEM) resources.
- Calculation formula: CPU instance fee = (vCPU size × vCPU usage unit price + memory size × MEM usage unit price) × instance execution duration + invocation counts × invocation unit price + EIP traffic (if any) × unit price
- Classified by instance type:
- Elastic instance: an instance automatically allocated and released by the system for the function. The calculation formula is the same as for CPU/GPU instances.
- Reserved instance: an instance allocated, released, and managed by you for the function. The calculation formula is the same as for CPU/GPU instances.
- EIP outbound traffic: Fees for outbound traffic generated when the function accesses the public network through the default network card. Billing granularity is 1 Byte; usage less than 1 Byte is billed as 1 Byte. Calculation formula: EIP outbound traffic fee = EIP outbound traffic × unit price.
tip
For functions triggered by the API Gateway, data returned after the function execution finishes is not recorded as function outbound traffic; data returned by the API Gateway to the client-side is recorded and billed as outbound traffic by the API Gateway. For API Gateway billing details, refer to Product billing. - Microservices applications billing: The CPU allocation mode of microservices applications is always occupies CPU, and supports using GPU resources. The platform does not manage the traffic of microservices applications, or charge the fees of invocation counts. The fees of resources are billed as reserved instances.
- Cloud sandbox billing information: Cloud sandbox does not charge fees based on the number of invocations. Resource fees are charged based on the lifecycle of reserved instances. For the relevant billing items, see the Billing items section below in this article, specifically the Cloud sandbox content.
Function and application
The pay-as-you-go Function as a Service has a billing cycle that is accurate to one millisecond, and the bill generated in this billing cycle is settled hourly. The bill fees will be automatically deducted from your Volcano Engine account. You can view the bill details in the Billing center. If the available credit (including account balance and coupons) in your account is less than the amount of the bill to be settled, then you will receive SMS or email notification of insufficient balance.
tip
This section will take functions and applications as the billing examples and give prices for reference only. Prices are subject to change. See the console for the latest prices.
Example 1: Billing for an elastic instance of a CPU type
- Instance specification: 1 vCPU, 2 GiB memory
- Instance execution duration: 1 hour (3,600 seconds)
- Invocation count: 100,000 calls
- Public network access: Function did not access the public network
The total fees are as follows:
Total fees = (1 vCPU × 0.0001012 CNY/vCPU/second + 2 GiB × 0.0000256 CNY/GiB/second) × 3,600 seconds + 100,000 invocations × 0.01 CNY/10,000 invocations = 0.64864 CNY
Example 2: Billing for a reserved instance of a GPU card type
- Instance specification: NVIDIA GPU (computing power 1 card, video memory 24 GiB, memory 60 GiB)
- Region: China (Shanghai)
- Instance execution duration: 1 hour (3,600 seconds)
- Invocation count: 100,000 calls
- Public network access: Accessed public network through default network card and generated 1.2 GiB traffic
The total fees are as follows:
Total fees = (24 GiB × 0.000079 CNY/GiB/second + 60 GiB × 0.0000305 CNY/GiB/second) × 3,600 seconds + 100,000 invocations × 0.01 CNY/10,000 invocations + 1.2 GiB × 0.8 CNY/GiB = 14.4736 CNY