Billing Items
Billing Description
The billing items of FunctionGraph consist of requests, execution duration, and others. For details, see Table 1.
For details about FunctionGraph prices, see FunctionGraph Pricing Details.
Billing Item |
Description |
Billing Mode |
Formula |
---|---|---|---|
Price for requests |
Total number of times all of your functions are invoked. |
Pay-per-use |
For details about the unit price of requests, see Pricing Details. |
Execution duration (non-reserved instances) |
The execution duration fee depends on the execution duration and memory allocated to the function. The following describes how computing resources are calculated: FunctionGraph calculates the resource consumption of a function by multiplying the selected memory by the execution duration. The execution duration is calculated from the time when your function code starts to execute to the time when it returns a response or terminates. It is rounded up to the nearest 1 ms. If the duration is less than 1 ms, you will be billed for 1 ms. For example, if function A is executed for 0.5 ms and function B is executed for 2.3 ms, the execution duration of function A is 1 ms and that of function B is 3 ms. |
Pay-per-use |
Compute resource consumption = Memory size (GB) × Execution duration (s) The execution duration is measured at a granularity of 1 ms and converted to seconds for resource consumption calculations.
For details about the unit price of execution duration, see Pricing Details. |
Execution duration (reserved instances) |
The execution duration fee depends on the execution duration and memory allocated to the function. The following describes how computing resources are calculated: FunctionGraph calculates the resource consumption of a function by multiplying the selected memory by the execution duration. The execution duration is calculated from the time when reserved instances are successfully created to the time when you call an API to release these instances. Reserved instances that stay alive for less than 1 minute will be billed for 1 minute. Those that stay alive for a longer time will be rounded up to the nearest 1s. For details, see Reserved Instance Billing and Billing Analysis (Scenario I). |
Pay-per-use |
For details about the unit price of execution duration, see Pricing Details. |
Others |
Additional charges will apply if other cloud services, such as OBS and SMN, are used with FunctionGraph. |
Billing modes of involved services |
The billing modes of other cloud services are different. For details, see Pricing Details. |
Reserved Instance Billing
You can create and release reserved instances and will be billed based on their execution duration. Reserved instances stay alive in the execution environment, eliminating the influence of cold starts on latency.
- If you call an API to create a reserved instance, billing will begin as soon as the reserved instance creation is complete.
- If you call another API to release a reserved instance, new requests will not be routed to the reserved instance. The reserved instance will be released within a certain period, and the billing will stop.
As shown in Figure 1, the billing lasts from T1 to T4.
Reserved instances are metered at a granularity of second. If a reserved instance runs for any fraction of a minute, you will be billed for the full minute. Otherwise, you will be billed based on the actual execution duration.
For example, if a reserved instance runs for 51s, you will be billed for 1 minute. If the reserved instance runs for 61s, you will be billed for 61s.
- The unit of execution duration is GB-second, which means that when the memory size is 1 GB, the duration is charged by the second.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.