Billing Examples
Billing Scenario I
A user created functions A, B, and C in April, as shown in Table 1. Assume that the total number of executions of these three functions in April was 2 million, 100,000, and 100,000. How much was the user billed for the three functions in April?
Function |
Description |
---|---|
Function A (not using reserved instances) |
Created on April 5, 2023. Assume that the memory of function A is 512 MB and the execution duration is 500 ms. |
Function B (using reserved instances and idle mode disabled) |
Created on April 18, 2023. Assume that the memory of function B is 128 MB and the execution time is 10s. If function B was deleted on April 30, 2023, the running duration of function B is 12 days. |
Function C (using reserved instances and idle mode enabled) |
Created on April 20, 2023. Assume that the memory of function C is 128 MB and the execution time is 5s. If function C was deleted on April 30, 2023, the running duration of function C is 10 days. |
Billing Analysis (Scenario I)
Functions A, B, and C are billed separately since they use different types of instances. For details, see Table 2.
Billing Item |
Billing Details |
---|---|
Price for requests |
(2 million requests + 100,000 requests + 100,000 requests – 1 million requests) × $0.2 USD/1 million requests = $0.24 USD |
Price for execution duration |
Total execution duration of function A: 512 MB/1024 MB × (500 ms/1000 ms) × 2 million requests = 500,000 GB-seconds. Total execution duration of function B: 128 MB/1024 MB × (12 × 24 × 60 × 60) = 129,600 GB-seconds. The execution duration of function C is divided into two parts:
Price for execution duration of functions A, B, and C: $0.00001667 USD/GB-second × (500,000 GB-seconds + 129,600 GB-seconds + 62,500 GB-seconds – 400,000 GB-seconds) + 45,500 GB-seconds × $0.000005556/GB-second = $5.122105 |
Total |
Price for requests + Price for execution duration = $0.24 USD + $5.122105 = $5.362105 ≈ $5.36 |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot