Skip to content

Commit 0fb397e

Browse files
Merge pull request #290246 from ggailey777/ignite-updates
[Functions] Pre-Ignite updates
2 parents 8dd7bdf + e7a8b43 commit 0fb397e

File tree

6 files changed

+150
-86
lines changed

6 files changed

+150
-86
lines changed

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

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,42 +10,30 @@ ms.custom:
1010

1111
# Estimating consumption-based costs
1212

13-
This article shows you how to estimate plan costs for the Consumption and Flex Consumption hosting plans.
13+
This article shows you how to estimate plan costs for the Flex Consumption and Consumption hosting plans.
1414

15-
Azure Functions currently offers four different hosting plans for your function apps, with each plan having its own pricing model:
15+
Azure Functions currently offers these different hosting options for your function apps, with each option having its own hosting plan pricing model:
1616

1717
| Plan | Description |
1818
| ---- | ----------- |
19-
| [**Consumption**](consumption-plan.md) | You're only charged for the time that your function app runs. This plan includes a [free grant][pricing page] on a per subscription basis.|
20-
| [**Flex Consumption plan**](flex-consumption-plan.md)| You pay for execution time on the instances on which your functions are running, plus any _always ready_ instances. Instances are dynamically added and removed based on the number of incoming events. Also supports virtual network integration. |
19+
| [**Flex Consumption plan**](flex-consumption-plan.md)| You pay for execution time on the instances on which your functions are running, plus any _always ready_ instances. Instances are dynamically added and removed based on the number of incoming events. This is the recommended dynamic scale plan, which also supports virtual network integration. |
2120
| [**Premium**](functions-premium-plan.md) | Provides you with the same features and scaling mechanism as the Consumption plan, but with enhanced performance and virtual network integration. Cost is based on your chosen pricing tier. To learn more, see [Azure Functions Premium plan](functions-premium-plan.md). |
2221
| [**Dedicated (App Service)**](dedicated-plan.md) <br/>(basic tier or higher) | When you need to run in dedicated VMs or in isolation, use custom images, or want to use your excess App Service plan capacity. Uses [regular App Service plan billing](https://azure.microsoft.com/pricing/details/app-service/). Cost is based on your chosen pricing tier.|
22+
| [**Container Apps**](functions-container-apps-hosting.md) | Create and deploy containerized function apps in a fully managed environment hosted by Azure Container Apps, which lets you rRun your functions alongside other microservices, APIs, websites, and workflows as container-hosted programs. |
23+
| [**Consumption**](consumption-plan.md) | You're only charged for the time that your function app runs. This plan includes a [free grant][pricing page] on a per subscription basis.|
2324

2425
[!INCLUDE [functions-flex-preview-note](../../includes/functions-flex-preview-note.md)]
2526

26-
You should always choose the plan that best supports the feature, performance, and cost requirements for your function executions. To learn more, see [Azure Functions scale and hosting](functions-scale.md).
27+
You should always choose the option that best supports the feature, performance, and cost requirements for your function executions. To learn more, see [Azure Functions scale and hosting](functions-scale.md).
2728

28-
This article focuses on Consumption and Flex Consumption plans because in these plans billing depends on active periods of executions inside each instance.
29+
This article focuses on Flex Consumption and Consumption plans because in these plans billing depends on active periods of executions inside each instance.
2930

3031
Durable Functions can also run in both of these plans. To learn more about the cost considerations when using Durable Functions, see [Durable Functions billing](./durable/durable-functions-billing.md).
3132

3233
## Consumption-based costs
3334

3435
The way that consumption-based costs are calculated, including free grants, depends on the specific plan. For the most current cost and grant information, see the [Azure Functions pricing page](https://azure.microsoft.com/pricing/details/functions/).
3536

36-
### [Consumption plan](#tab/consumption-plan)
37-
38-
The execution *cost* of a single function execution is measured in *GB-seconds*. Execution cost is calculated by combining its memory usage with its execution time. A function that runs for longer costs more, as does a function that consumes more memory.
39-
40-
Consider a case where the amount of memory used by the function stays constant. In this case, calculating the cost is simple multiplication. For example, say that your function consumed 0.5 GB for 3 seconds. Then the execution cost is `0.5GB * 3s = 1.5 GB-seconds`.
41-
42-
Since memory usage changes over time, the calculation is essentially the integral of memory usage over time. The system does this calculation by sampling the memory usage of the process (along with child processes) at regular intervals. As mentioned on the [pricing page], memory usage is rounded up to the nearest 128-MB bucket. When your process is using 160 MB, you're charged for 256 MB. The calculation takes into account concurrency, which is multiple concurrent function executions in the same process.
43-
44-
> [!NOTE]
45-
> While CPU usage isn't directly considered in execution cost, it can have an impact on the cost when it affects the execution time of the function.
46-
47-
For an HTTP-triggered function, when an error occurs before your function code begins to execute you aren't charged for an execution. This means that 401 responses from the platform due to API key validation or the App Service Authentication / Authorization feature don't count against your execution cost. Similarly, 5xx status code responses aren't counted when they occur in the platform before your function processes the request. A 5xx response generated by the platform after your function code has started to execute is still counted as an execution, even when the error isn't raised from your function code.
48-
4937
### [Flex Consumption plan](#tab/flex-consumtion-plan)
5038

5139
[!INCLUDE [functions-flex-consumption-billing-table](../../includes/functions-flex-consumption-billing-table.md)]
@@ -94,6 +82,19 @@ In a situation like this, the pricing depends more on the kind of work being don
9482

9583
In this scenario, the total hourly cost of running on-demand on a single instance is `$0.1152 + $0.0288 = $0.144 USD`.
9684

85+
### [Consumption plan](#tab/consumption-plan)
86+
87+
The execution _cost_ of a single function execution is measured in _GB-seconds_. Execution cost is calculated by combining its memory usage with its execution time. A function that runs for longer costs more, as does a function that consumes more memory.
88+
89+
Consider a case where the amount of memory used by the function stays constant. In this case, calculating the cost is simple multiplication. For example, say that your function consumed 0.5 GB for 3 seconds. Then the execution cost is `0.5GB * 3s = 1.5 GB-seconds`.
90+
91+
Since memory usage changes over time, the calculation is essentially the integral of memory usage over time. The system does this calculation by sampling the memory usage of the process (along with child processes) at regular intervals. As mentioned on the [pricing page], memory usage is rounded up to the nearest 128-MB bucket. When your process is using 160 MB, you're charged for 256 MB. The calculation takes into account concurrency, which is multiple concurrent function executions in the same process.
92+
93+
> [!NOTE]
94+
> While CPU usage isn't directly considered in execution cost, it can have an impact on the cost when it affects the execution time of the function.
95+
96+
For an HTTP-triggered function, when an error occurs before your function code begins to execute you aren't charged for an execution. This means that 401 responses from the platform due to API key validation or the App Service Authentication / Authorization feature don't count against your execution cost. Similarly, 5xx status code responses aren't counted when they occur in the platform before your function processes the request. A 5xx response generated by the platform after your function code has started to execute is still counted as an execution, even when the error isn't raised from your function code.
97+
9798
---
9899

99100
## Other related costs

0 commit comments

Comments
 (0)