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/functions-premium-plan.md
+19-14Lines changed: 19 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Azure Functions Premium plan
3
3
description: Details and configuration options (VNet, no cold start, unlimited execution duration) for the Azure Functions Premium plan.
4
4
author: jeffhollan
5
5
ms.topic: conceptual
6
-
ms.date: 10/16/2019
6
+
ms.date: 08/28/2020
7
7
ms.author: jehollan
8
8
ms.custom: references_regions
9
9
@@ -32,27 +32,32 @@ With the plan created, you can use [az functionapp create](/cli/azure/functionap
32
32
33
33
The following features are available to function apps deployed to a Premium plan.
34
34
35
-
### Always warm instances
35
+
### Always ready instances
36
36
37
37
If no events and executions occur today in the Consumption plan, your app may scale in to zero instances. When new events come in, a new instance needs to be specialized with your app running on it. Specializing new instances may take some time depending on the app. This additional latency on the first call is often called app cold start.
38
38
39
-
In the Premium plan, you can have your app always warm on a specified number of instances, up to 20. When events begin to trigger the app, they will immediately be routed to these always warm instances first. As the function becomes active, additional instances will be warmed as a buffer if your app needs to scale beyond the always warm instances. These buffered instances are called [pre-warmed] instances. With the combination of the always warm instances for the app, and a pre-warmed buffer, your app can effectively eliminate cold start. At least one instance will always be active for every premium plan.
39
+
In the Premium plan, you can have your app always ready on a specified number of instances. The maximum number of always ready instances is 20. When events begin to trigger the app, they are routed to the always ready instances first. As the function becomes active, additional instances will be warmed as a buffer. This buffer prevents cold start for new instances required during scale. These buffered instances are called [pre-warmed instances](#pre-warmed-instances). With the combination of the always ready instances and a pre-warmed buffer, your app can effectively eliminate cold start.
40
40
41
-
You can configure the number of always warm instances in the Azure portal by selected your **Function App**, going to the **Platform Features** tab, and selecting the **Scale Out** options. In the function app edit window, always warm instances is specific to that app.
41
+
> [!NOTE]
42
+
> Every premium plan will have at least one active and billed instance at all times.
43
+
44
+
You can configure the number of always ready instances in the Azure portal by selected your **Function App**, going to the **Platform Features** tab, and selecting the **Scale Out** options. In the function app edit window, always ready instances are specific to that app.
Pre-warmed instances are the number of instances that continue to warm as a buffer during scale and activation events. These pre-warmed instances will continue to buffer until the maximum scale out limit is hit for the app. The default pre-warmed instance count is 1, and for most scenarios should remain as 1. If you have an that has extensive warm up times, like a custom docker container image, you may wish to increase this buffer. A pre-warmed instance will become active once all allocated instances have been sufficiently utilized.
56
+
Pre-warmed instances are the number of instances warmed as a buffer during scale and activation events. Pre-warmed instances continue to buffer until the maximum scale-out limit is reached. The default pre-warmed instance count is 1, and for most scenarios should remain as 1. If an app has a long warm up (like a custom container image), you may wish to increase this buffer. A pre-warmed instance will become active only after all active instances have been sufficiently utilized.
57
+
58
+
Consider this example of how always ready instances and pre-warmed instances work together. A premium function app has five always ready instances configured, and the default of one prewarmed instance. When the app is idle and no events are triggering, the app will be provisioned and running on five instances.
54
59
55
-
Consider this example of how always warm instances and pre-warmed instances work together. A premium function app has 5 always warm instances configured, and the default of 1 prewarmed instance. When the app is idle and no events are triggering, the app will be provisioned and running on 5 instances. As soon as the first trigger comes in, the 5 always warm instances become active, and an additional pre-warmed instance is allocated. The app is now running with 6 provisioned instances: the 5 now-active always warm instances, and the 6th pre-warmed and inactive buffer. If the rate of executions continues to increase, the 5 active instances will eventually be utilized. When the platform decides to scale beyond 5 instances, it will scale into the pre-warmed instance. When that happens, there will now be 6 active instances, and a 7th instance will instantly be provisioned and fill the pre-warmed buffer. This sequence of scaling and pre-warming will continue until the maximum instance count for the app is reached. No instances will be pre-warmed or activated beyond the maximum.
60
+
As soon as the first trigger comes in, the five always ready instances become active, and an additional pre-warmed instance is allocated. The app is now running with six provisioned instances: the five now-active always ready instances, and the sixth pre-warmed and inactive buffer. If the rate of executions continues to increase, the five active instances will eventually be utilized. When the platform decides to scale beyond five instances, it will scale into the pre-warmed instance. When that happens, there will now be six active instances, and a seventh instance will instantly be provisioned and fill the pre-warmed buffer. This sequence of scaling and pre-warming will continue until the maximum instance count for the app is reached. No instances will be pre-warmed or activated beyond the maximum.
56
61
57
62
You can modify the number of pre-warmed instances for an app using the Azure CLI.
58
63
@@ -62,7 +67,7 @@ az resource update -g <resource_group> -n <function_app_name>/config/web --set p
62
67
63
68
#### Maximum instances for an app
64
69
65
-
In addition to the [plan maximum instance count](#plan-and-sku-settings) you can configure a per-app maximum. This can be configured [using the same property](./functions-scale.md#limit-scale-out) that limits scale out for a consumption function on a per-app basis.
70
+
In addition to the [plan maximum instance count](#plan-and-sku-settings), you can configure a per-app maximum. The app maximum can be configured using the [app scale limit](./functions-scale.md#limit-scale-out).
66
71
67
72
### Private network connectivity
68
73
@@ -80,13 +85,13 @@ To learn more about how scaling works, see [Function scale and hosting](./functi
80
85
81
86
### Longer run duration
82
87
83
-
Azure Functions in a Consumption plan are limited to 10 minutes for a single execution. In the Premium plan, the run duration defaults to 30 minutes to prevent runaway executions. However, you can [modify the host.json configuration](./functions-host-json.md#functiontimeout) to make this unbounded for Premium plan apps (guaranteed 60 minutes).
88
+
Azure Functions in a Consumption plan are limited to 10 minutes for a single execution. In the Premium plan, the run duration defaults to 30 minutes to prevent runaway executions. However, you can [modify the host.json configuration](./functions-host-json.md#functiontimeout) to make the duration unbounded for Premium plan apps (guaranteed 60 minutes).
84
89
85
90
## Plan and SKU settings
86
91
87
92
When you create the plan, there are two plan size settings: the minimum number of instances (or plan size) and the maximum burst limit.
88
93
89
-
If your app requires instances beyond the always warm instances, it can continue to scale out until the number of instances hits the maximum burst limit. You are billed for instances beyond your plan size only while they are running and rented to you. We will make a best effort at scaling your app out to its defined maximum limit.
94
+
If your app requires instances beyond the always ready instances, it can continue to scale out until the number of instances hits the maximum burst limit. You are billed for instances beyond your plan size only while they are running and rented to you. We will make a best effort at scaling your app out to its defined maximum limit.
90
95
91
96
You can configure the plan size and maximums in the Azure portal by selecting the **Scale Out** options in the plan or a function app deployed to that plan (under **Platform Features**).
92
97
@@ -96,12 +101,12 @@ You can also increase the maximum burst limit from the Azure CLI:
The minimum for every plan will be at least 1 instance. The actual minimum number of instances will be auto-configured for you based on the always warm instances requested by apps in the plan. For example, if app A requests 5 always warm instances, and app B requests 2 always warm instances in the same plan, the minimum plan size will be calculated as 5. App A will be running on all 5, whereas app B will only be running on 2.
104
+
The minimum for every plan will be at least one instance. The actual minimum number of instances will be autoconfigured for you based on the always ready instances requested by apps in the plan. For example, if app A requests five always ready instances, and app B requests two always ready instances in the same plan, the minimum plan size will be calculated as five. App A will be running on all 5, and app B will only be running on 2.
100
105
101
106
> [!IMPORTANT]
102
107
> You are charged for each instance allocated in the minimum instance count regardless if functions are executing or not.
103
108
104
-
Under most circumstances this auto-calculated minimum should be sufficient. However, scaling beyond the minimum occurs at a best effort. It is possible, though unlikely, that at a specific time scaleout could be delayed if additional instances are unable to be rented. By setting a minimum higher than the auto-calculated minimum, you reserve instances in advance of scaleout.
109
+
In most circumstances this autocalculated minimum should be sufficient. However, scaling beyond the minimum occurs at a best effort. It is possible, though unlikely, that at a specific time scale-out could be delayed if additional instances are unavailable. By setting a minimum higher than the autocalculated minimum, you reserve instances in advance of scale-out.
105
110
106
111
Increasing the calculated minimum for a plan can be done using the Azure CLI.
107
112
@@ -126,7 +131,7 @@ For example, a JavaScript function app is constrained by the default memory limi
126
131
127
132
## Region Max Scale Out
128
133
129
-
Below are the currently supported maximum scaleout values for a single plan in each region and OS configuration. To request an increase please open a support ticket.
134
+
Below are the currently supported maximum scale-out values for a single plan in each region and OS configuration. To request an increase, please open a support ticket.
130
135
131
136
See the complete regional availability of Functions here: [Azure.com](https://azure.microsoft.com/global-infrastructure/services/?products=functions)
0 commit comments