Skip to content

Commit 19a4acf

Browse files
authored
[Functions][Flex] Update costs calcs
1 parent c0bc275 commit 19a4acf

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

articles/azure-functions/functions-consumption-costs.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Estimating consumption-based costs in Azure Functions
33
description: Learn how to better estimate the costs that you might incur when running your function app in either the Consumption plan or the Flex Consumption plan in Azure Functions.
4-
ms.date: 11/05/2024
4+
ms.date: 02/10/2025
55
ms.topic: conceptual
66
ms.custom:
77
- build-2024
@@ -52,24 +52,24 @@ Consider a function app that is comprised only of HTTP triggers with and these b
5252
+ HTTP triggers handle 10 concurrent requests.
5353
+ The instance memory size setting is `2048 MB`.
5454
+ There are _no always ready instances configured_, which means the app can scale to zero.
55-
<!--- Update these example calculations after 12/1 based on GA pricing -->
55+
5656
In a situation like this, the pricing depends more on the kind of work being done during code execution. Let's look at two workload scenarios:
5757

5858
+ **CPU-bound workload:** In a CPU-bound workload, there's no advantage to processing multiple requests in parallel in the same instance. This means that you're better off distributing each request to its own instance so requests complete as a quickly as possible without contention. In this scenario, you should set a low [HTTP trigger concurrency](./functions-concurrency.md#http-trigger-concurrency) of `1`. With 10 concurrent requests, the app scales to a steady state of roughly 10 instances, and each instance is continuously active processing one request at a time.
5959

60-
Because the size of each instance is ~2 GB, the consumption for a single continuously active instance is `2 GB * 3600 s = 7200 GB-s`, which at the assumed on-demand execution rate (without any free grants applied) is `$0.1152 USD` per hour per instance. Because the CPU-bound app is scaled to 10 instance, the total hourly rate for execution time is `$1.152 USD`.
60+
Because the size of each instance is ~2 GB, the consumption for a single continuously active instance is `2 GB * 3600 s = 7200 GB-s`. Assuming an on-demand execution rate of $0.000026 GB-s (without any free grants applied) becomes `$0.1872 USD` per hour per instance. Because the CPU-bound app is scaled to 10 instance, the total hourly rate for execution time is `$1.872 USD`.
6161

62-
Similarly, the on-demand per-execution charge (without any free grants) of 40 requests per second is equal to `40 * 3600 = 144,000` or 0.144 million executions per hour. The total (grant-free) hourly cost of executions is then `0.144 * $0.20`, which is `$0.0288` per hour.
62+
Similarly, the on-demand per-execution charge (without any free grants) of 40 requests per second is equal to `40 * 3600 = 144,000` or `0.144 million` executions per hour. Assuming an on-demand rate of `$0.40` per million executions, the total (grant-free) hourly cost of executions is `0.144 * $0.40`, which is `$0.0576` per hour.
6363

64-
In this scenario, the total hourly cost of running on-demand on 10 instances is `$1.152 + $0.0288 = $1.1808 USD`.
64+
In this scenario, the total hourly cost of running on-demand on 10 instances is `$1.872 + $0.0576s = $1.9296 USD`.
6565

6666
+ **IO bound workload:** In an IO-bound workload, most of the application time is spent waiting on incoming request, which might be limited by network throughput or other upstream factors. Because of the limited inputs, the code can process multiple operations concurrently without negative impacts. In this scenario, assume you can process all 10 concurrent requests on the same instance.
6767

68-
Because consumption charges are based only on the memory of each active instance, the consumption charge calculation is simply `2 GB * 3600 s = 7200 GB-s`, which at the assumed on-demand execution rate (without any free grants applied) is `$0.1152 USD` per hour for the single instance.
68+
Because consumption charges are based only on the memory of each active instance, the consumption charge calculation is simply `2 GB * 3600 s = 7200 GB-s`, which at the assumed on-demand execution rate (without any free grants applied) is `$0.1872 USD` per hour for the single instance.
6969

70-
As in the CPU-bound scenario, the on-demand per-execution charge (without any free grants) of 40 requests per second is equal to `40 * 3600 = 144,000` or 0.144 million executions per hour. In this case, the total (grant-free) hourly cost of executions `0.144 * $0.20`, which is `$0.0288` per hour.
70+
As in the CPU-bound scenario, the on-demand per-execution charge (without any free grants) of 40 requests per second is equal to `40 * 3600 = 144,000` or 0.144 million executions per hour. In this case, the total (grant-free) hourly cost of executions `0.144 * $0.40`, which is `$0.0576` per hour.
7171

72-
In this scenario, the total hourly cost of running on-demand on a single instance is `$0.1152 + $0.0288 = $0.144 USD`.
72+
In this scenario, the total hourly cost of running on-demand on a single instance is `$0.1872 + $0.0576 = $0.245 USD`.
7373

7474
### [Consumption plan](#tab/consumption-plan)
7575

0 commit comments

Comments
 (0)