You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/flex-consumption-plan.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,9 +95,7 @@ Deployments in the Flex Consumption plan follow a single path. After your projec
95
95
96
96
The minimum billable execution period for both execution modes is 1,000 ms. Past that, the billable activity period is rounded up to the nearest 100 ms. You can find details on the Flex Consumption plan billing meters in the [Monitoring reference](monitor-functions-reference.md?tab=flex-consumption-plan#metrics).
97
97
98
-
For details about how costs are calculated when you run in a Flex Consumption plan, including examples, see [Consumption-based costs](functions-consumption-costs.md?tabs=flex-consumtion-plan#consumption-based-costs).
99
-
100
-
For the most up-to-date information on execution pricing, always ready baseline costs, and free grants for on demand executions, see the [Azure Functions pricing page](https://azure.microsoft.com/pricing/details/functions/).
98
+
For details about how costs are calculated when you run in a Flex Consumption plan, including examples, see [Consumption-based costs](functions-consumption-costs.md?tabs=flex-consumtion-plan#consumption-based-costs).
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-consumption-costs.md
+7-17Lines changed: 7 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Estimating consumption-based costs in Azure Functions
3
3
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: 5/05/2024
4
+
ms.date: 11/05/2024
5
5
ms.topic: conceptual
6
6
ms.custom:
7
7
- build-2024
@@ -54,26 +54,16 @@ This diagram represents how on-demand costs are determined in this plan:
54
54
55
55
In addition to execution time, when using one or more always ready instances, you're also billed at a lower, baseline rate for the number of always ready instances you maintain. Execution time for always ready instances might be cheaper than execution time on instances with on demand execution.
56
56
57
-
>[!IMPORTANT]
58
-
>In this article, prices are only provided to help understand example calculations. Always check the [Azure Functions pricing page](https://azure.microsoft.com/pricing/details/functions/) when estimating costs you might incur while running your functions in the Flex Consumtion plan.
59
-
60
-
For the examples in this section, consider the discounted preview pricing in this table for pay-as-you-go in East US.
| On-demand | Execution time (GB-s) |`100,000`|`$0.000016` per GB-s |
65
-
| On-demand | Executions (count) |`250,000`|`$0.20` per million executions |
66
-
| Always ready | Baseline (idle) time (GB-s) |\-|`$0.000004` per GB-s |
67
-
| Always ready | Execution time (GB-s) |\-|`$0.000009` per GB-s |
68
-
| Always ready | Executions (count) |\-|`$0.20` per million executions |
57
+
> [!IMPORTANT]
58
+
> In this article, on-demand pricing is used to help understand example calculations. Always check the current costs in the [Azure Functions pricing page](https://azure.microsoft.com/pricing/details/functions/) when estimating costs you might incur while running your functions in the Flex Consumption plan.
69
59
70
60
Consider a function app that is comprised only of HTTP triggers with and these basic facts:
71
61
72
62
+ HTTP triggers handle 40 constant requests per second.
73
63
+ HTTP triggers handle 10 concurrent requests.
74
64
+ The instance memory size setting is `2048 MB`.
75
65
+ There are _no always ready instances configured_, which means the app can scale to zero.
76
-
66
+
<!--- Update these example calculations after 12/1 based on GA pricing -->
77
67
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:
78
68
79
69
+**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.
@@ -88,7 +78,7 @@ In a situation like this, the pricing depends more on the kind of work being don
88
78
89
79
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.
90
80
91
-
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. This makes the total (grant-free) hourly cost of executions `0.144 * $0.20`, which is `$0.0288` per hour.
81
+
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.
92
82
93
83
In this scenario, the total hourly cost of running on-demand on a single instance is `$0.1152 + $0.0288 = $0.144 USD`.
94
84
@@ -114,15 +104,15 @@ The following behaviors of your functions can affect the execution time:
114
104
115
105
+**Triggers and bindings**: The time taken to read input from and write output to your [function bindings](functions-triggers-bindings.md) is counted as execution time. For example, when your function uses an output binding to write a message to an Azure storage queue, your execution time includes the time taken to write the message to the queue, which is included in the calculation of the function cost.
116
106
117
-
+**Asynchronous execution**: The time that your function waits for the results of an async request (`await` in C#) is counted as execution time. The GB-second calculation is based on the start and end time of the function and the memory usage over that period. What is happening over that time in terms of CPU activity isn't factored into the calculation. You may be able to reduce costs during asynchronous operations by using [Durable Functions](durable/durable-functions-overview.md). You're not billed for time spent at awaits in orchestrator functions.
107
+
+**Asynchronous execution**: The time that your function waits for the results of an async request (`await` in C#) is counted as execution time. The GB-second calculation is based on the start and end time of the function and the memory usage over that period. What is happening over that time in terms of CPU activity isn't factored into the calculation. You might be able to reduce costs during asynchronous operations by using [Durable Functions](durable/durable-functions-overview.md). You're not billed for time spent at awaits in orchestrator functions.
118
108
119
109
## Viewing cost-related data
120
110
121
111
In [your invoice](../cost-management-billing/understand/download-azure-invoice.md), you can view the cost-related data of **Total Executions - Functions** and **Execution Time - Functions**, along with the actual billed costs. However, this invoice data is a monthly aggregate for a past invoice period.
122
112
123
113
### Function app-level metrics
124
114
125
-
To better understand the cost impact of your functions, you can use Azure Monitor to view cost-related metrics currently being generated by your function apps.
115
+
To better understand the costs of your functions, you can use Azure Monitor to view cost-related metrics currently being generated by your function apps.
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-reference-python.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ As a Python developer, you might also be interested in these topics:
46
46
47
47
## [Hosting options](#tab/hosting)
48
48
49
-
+[Flex Consumption plan](./flex-consumption-plan.md): Linux-based serverless hosting option that features full support for managed identities, virtual networks, and flexible deployments. This plan is currently in preview.
49
+
+[Flex Consumption plan](./flex-consumption-plan.md): Linux-based serverless hosting option that features full support for managed identities, virtual networks, and flexible deployments.
50
50
+[Container hosting options](container-concepts.md): Run and deploy your Python functions on Linux in a Docker container, including integrated [Azure Container Apps hosting](functions-container-apps-hosting.md).
Copy file name to clipboardExpand all lines: includes/functions-flex-consumption-billing-table.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ ms.service: azure-functions
4
4
ms.custom:
5
5
- build-2024
6
6
ms.topic: include
7
-
ms.date: 05/13/2024
7
+
ms.date: 11/05/2024
8
8
ms.author: glenga
9
9
---
10
10
There are two modes by which your costs are determined when running your apps in the Flex Consumption plan. Each mode is determined on a per-instance basis.
@@ -13,3 +13,5 @@ There are two modes by which your costs are determined when running your apps in
13
13
| ---- | ---- |
14
14
|**On Demand**| When running in _on demand_ mode, you are billed only for the amount of time your function code is executing on your available instances. In on demand mode, no minimum instance count is required. You're billed for:<br/><br/>• The total amount of memory provisioned while each on demand instance is _actively_ executing functions (in GB-seconds), minus a free grant of GB-s per month.<br/>• The total number of executions, minus a free grant (number) of executions per month. |
15
15
|**Always ready**| You can configure one or more instances, assigned to specific trigger types (HTTP/Durable/Blob) and individual functions, that are always available to be able handle requests. When you have any always ready instances enabled, you're billed for:<br/><br/>• The total amount of memory provisioned across all of your always ready instances, known as the _baseline_ (in GB-seconds).<br/>• The total amount of memory provisioned during the time each always ready instance is _actively_ executing functions (in GB-seconds).<br/>• The total number of executions.<br/><br/>In always ready billing, there are no free grants. |
16
+
17
+
For the most up-to-date information on execution pricing, always ready baseline costs, and free grants for on demand executions, see the [Azure Functions pricing page](https://azure.microsoft.com/pricing/details/functions/#pricing).
0 commit comments