Skip to content

Commit 70cfcd9

Browse files
committed
Thiago comments
1 parent faf58dd commit 70cfcd9

File tree

5 files changed

+153
-39
lines changed

5 files changed

+153
-39
lines changed

articles/azure-functions/event-driven-scaling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Event-driven scaling in Azure Functions
33
description: Explains the scaling behaviors of Consumption plan and Premium plan function apps.
4-
ms.date: 05/04/2024
4+
ms.date: 05/12/2024
55
ms.topic: conceptual
66
ms.service: azure-functions
77

articles/azure-functions/flex-consumption-how-to.md

Lines changed: 130 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Create and manage function apps in a Flex Consumption plan
33
description: "Learn how to create function apps hosted in the Flex Consumption plan in Azure Functions and how to modify specific settings for an existing function app."
4-
ms.date: 05/03/2024
4+
ms.date: 05/12/2024
55
ms.topic: how-to
66
zone_pivot_groups: programming-languages-set-functions
77

@@ -27,8 +27,7 @@ Function app resources are langauge-specific. Make sure to choose your preferred
2727
+ While not required to create a Flex Consumption plan app, you need a code project to be able to deploy to and validate a new function app. Complete the first part of one of these quickstart articles, where you creat a code project with an HTTP triggered function:
2828

2929
::: zone pivot="programming-language-csharp"
30-
+ [Create an Azure Functions project from the command line](create-first-function-cli-csharp.md)
31-
+ [Create an Azure Functions project using Visual Studio](./functions-create-your-first-function-visual-studio.md)
30+
+ [Create an Azure Functions project from the command line](create-first-function-cli-csharp.md)
3231
+ [Create an Azure Functions project using Visual Studio Code](create-first-function-vs-code-csharp.md)
3332
::: zone-end
3433
::: zone pivot="programming-language-javascript"
@@ -56,18 +55,6 @@ Function app resources are langauge-specific. Make sure to choose your preferred
5655

5756
Return to this article after you create and run the local project, but before you're asked to create Azure resources. You create the function app and other Azure resources in the next section.
5857

59-
## View currently supported regions
60-
61-
During the preview, you're only able to run on the Flex Consumption plan in selected regions. Use this Azure CLI command to review the list of regions that currently support Flex Consumption.
62-
63-
```azurecli-interactive
64-
az functionapp list-flexconsumption-locations --output table
65-
```
66-
67-
You need to first run `az login` when you aren't already signed-in to your Azure account.
68-
69-
When you create an app in the Azure portal, currently unsupported regions are filtered out of the region list.
70-
7158
## Create a Flex Consumption app
7259

7360
This section shows you how to create a function app in the Flex Consumption plan by using either the Azure CLI, Azure portal, or Visual Studio Code. For an example of creating an app in a Flex Consumption plan using Bicep/ARM templates, see the [Flex Consumption repository](https://github.com/Azure/azure-functions-flex-consumption/blob/main/samples/README.md#iac-samples-overview).
@@ -83,23 +70,17 @@ To support your function code, you need to create three resources:
8370

8471
### [Azure CLI](#tab/azure-cli)
8572

86-
1. If you haven't done so already, sign in to Azure:
87-
88-
```azurecli
89-
az login
90-
```
91-
92-
The [`az login`](/cli/azure/reference-index#az-login) command signs you into your Azure account.
73+
[!INCLUDE [functions-flex-supported-regions-cli](../../includes/functions-flex-supported-regions-cli.md)]
9374

94-
1. Create a resource group in one of the [currently supported regions](#view-currently-supported-regions):
75+
3. Create a resource group in one of the [currently supported regions](#view-currently-supported-regions):
9576

9677
```azurecli
9778
az group create --name <RESOURCE_GROUP> --location <REGION>
9879
```
9980
10081
In the above command, replace `<RESOURCE_GROUP>` with a value that's unique in your subscription and `<REGION>` with one of the [currently supported regions](#view-currently-supported-regions). The [az group create](/cli/azure/group#az-group-create) command creates a resource group.
10182
102-
1. Create a general-purpose storage account in your resource group and region:
83+
4. Create a general-purpose storage account in your resource group and region:
10384
10485
```azurecli
10586
az storage account create --name <STORAGE_NAME> --location <REGION> --resource-group <RESOURCE_GROUP> --sku Standard_LRS --allow-blob-public-access false
@@ -109,7 +90,7 @@ To support your function code, you need to create three resources:
10990
11091
[!INCLUDE [functions-storage-access-note](../../includes/functions-storage-access-note.md)]
11192
112-
4. Create the function app in Azure:
93+
5. Create the function app in Azure:
11394
::: zone pivot="programming-language-csharp"
11495
```azurecli
11596
az functionapp create --resource-group <RESOURCE_GROUP> --name <APP_NAME> --storage-account <STORAGE_NAME> --flexconsumption-location <REGION> --runtime dotnet-isolated --runtime-version 8.0
@@ -141,7 +122,7 @@ To support your function code, you need to create three resources:
141122
az functionapp create --resource-group <RESOURCE_GROUP> --name <APP_NAME> --storage-account <STORAGE_NAME> --flexconsumption-location <REGION> --runtime powershell --runtime-version 7.4
142123
```
143124
::: zone-end
144-
In this example, replace both `<RESOURCE_GROUP>` and `<STORAGE_NAME>` with the resource group and the name of the account you used in the previous step, respectively. Also replace `<APP_NAME>` with a globally unique name appropriate to you. The `<APP_NAME>` is also the default DNS domain for the function app. The [`az functionapp create`] command creates the function app in Azure.
125+
In this example, replace both `<RESOURCE_GROUP>` and `<STORAGE_NAME>` with the resource group and the name of the account you used in the previous step, respectively. Also replace `<APP_NAME>` with a globally unique name appropriate to you. The `<APP_NAME>` is also the default domain name server (DNS) domain for the function app. The [`az functionapp create`] command creates the function app in Azure.
145126
146127
This command creates a function app running in the Flex Consumption plan. The specific language runtime version used is one that is currently supported in the preview.
147128
@@ -154,7 +135,6 @@ To support your function code, you need to create three resources:
154135
155136
### [Visual Studio Code](#tab/vs-code)
156137
157-
158138
1. Press F1, and in the command pallet enter **Azure Functions: Create function app in Azure...(Advanced)**.
159139
160140
1. If you're not signed in, you're prompted to **Sign in to Azure**. You can also **Create a free Azure account**. After signing in from the browser, go back to Visual Studio Code.
@@ -202,7 +182,6 @@ You can use Maven to create a Flex Consumption hosted function app and required
202182
203183
+ [Create an Azure Functions project from the command line](create-first-function-cli-java.md)
204184
+ [Create an Azure Functions project using Visual Studio Code](create-first-function-vs-code-java.md)
205-
::: zone-end
206185
207186
1. In your Java code project, open the pom.xml file and make these changes to create your function app in the Flex Consumption plan:
208187
@@ -241,7 +220,17 @@ You can use Maven to create a Flex Consumption hosted function app and required
241220
242221
In the Flex Consumption plan, the deployment package that contains your app's code is maintained in a blob storage container. By default, deployments use the same storage account and connection string (`AzureWebJobsStorage`) used by the Functions runtime to maintain your app. However, you can instead designate a blob container in a separate storage account as the deployment source for your code.
243222
244-
You can configure the deployment storage account when using the Azure CLI by setting these optional parameters when you use the [`az functionapp create`] command:
223+
A custom deployment storage account must meet these conditions:
224+
225+
+ The storage account must already exist.
226+
+ The container to use for deployments must also exist and be empty.
227+
+ An application setting that contains the connection string for the deployment storage account must already exist.
228+
229+
To configure the deployment storage account when you create your function app in the Flex Consumption plan:
230+
231+
### [Azure CLI](#tab/azure-cli)
232+
233+
Use the [`az functionapp create`] command and supply these additional options that customize deployment storage:
245234
246235
| Parameter | Description |
247236
|--|--|--|
@@ -253,15 +242,48 @@ You can configure the deployment storage account when using the Azure CLI by set
253242
This example creates a function app in the Flex Consumption plan with a separate deployment storage account:
254243
255244
```azurecli
256-
az functionapp create --resource-grpoup <RESOURCE_GROUP> --name <APP_NAME> --storage <STORAGE_ACCOUNT> --runtime dotnet-isolated --runtime-version 8.0 --flexconsumption-location "<REGION>" --deployment-storage-name <DEPLOYMENT_ACCCOUNT_NAME> --deployment-storage-container-name <DEPLOYMENT_CONTAINER_NAME> --deployment-storage-auth-type storageAccountConnectionString --deployment-storage-auth-value <DEPLOYMENT_CONNECTION_STRING_NAME>"
245+
az functionapp create --resource-grpoup <RESOURCE_GROUP> --name <APP_NAME> --storage <STORAGE_NAME> --runtime dotnet-isolated --runtime-version 8.0 --flexconsumption-location "<REGION>" --deployment-storage-name <DEPLOYMENT_ACCCOUNT_NAME> --deployment-storage-container-name <DEPLOYMENT_CONTAINER_NAME> --deployment-storage-auth-type storageAccountConnectionString --deployment-storage-auth-value <DEPLOYMENT_CONNECTION_STRING_NAME>"
257246
```
258247

248+
You can also modify the deployment storage configuration used to deploy to an existing app.
249+
250+
### [Azure portal](#tab/azure-portal)
251+
252+
You can't currently configure deployment storage when creating your app in the Azure portal. To configure deployment storage during app creation, instead use the Azure CLI to create your app.
253+
254+
You can use the portal to modify the deployment settings of an existing app, as detailed in the next section.
255+
256+
### [Visual Studio Code](#tab/vs-code)
257+
258+
You can't currently configure deployment storage when creating your app in Azure using Visual Studio Code.
259+
260+
---
261+
262+
### [Azure CLI](#tab/azure-cli)
263+
259264
You can also use the [`az functionapp deployment config set`](/cli/azure/functionapp/deployment/config#az-functionapp-deployment-config-set) command to modify the deployment storage configuration:
260265

261266
```azurecli
262267
az functionapp deployment config set --resource-grpoup <RESOURCE_GROUP> --name <APP_NAME> --deployment-storage-name <DEPLOYMENT_ACCCOUNT_NAME> --deployment-storage-container-name <DEPLOYMENT_CONTAINER_NAME>
263268
```
264269

270+
### [Azure portal](#tab/azure-portal)
271+
272+
1. In your function app page in the [Azure portal](https://portal.azure.com), expand **Settings** in the left menu and select **Deployment settings**.
273+
274+
1. Select an existing **Storage account** and then select an existing empty container in the account.
275+
276+
1. Select the **App setting name** for the setting that contains the connection string for the deployment storage account.
277+
278+
1. Select **Save** to update the app.
279+
280+
281+
### [Visual Studio Code](#tab/vs-code)
282+
283+
You can't currently configure deployment storage for your app in Azure using Visual Studio Code.
284+
285+
---
286+
265287
## Configure instance memory
266288

267289
The instance memory size used by your Flex Consumption plan can be explicitly set when you create your app. For more information about supported sizes, see [Instance memory](flex-consumption-plan.md#instance-memory).
@@ -286,28 +308,63 @@ You can't currently control the instance memory size when you use Visual Studio
286308

287309
---
288310

289-
At any point, you can change the instance memory size setting for your app by using the Azure CLI. This example uses the [`az functionapp scale config set`](/cli/azure/functionapp/scale/config#az-functionapp-scale-config-set) command to change the instance memory size setting to 512 MB:
311+
At any point, you can change the instance memory size setting used by your app.
312+
313+
### [Azure CLI](#tab/azure-cli)
314+
315+
This example uses the [`az functionapp scale config set`](/cli/azure/functionapp/scale/config#az-functionapp-scale-config-set) command to change the instance memory size setting to 512 MB:
290316

291317
```azurecli
292318
az functionapp scale config set -g <resourceGroup> --name <APP_NAME> --instance-memory 512
293319
```
294320

321+
### [Azure portal](#tab/azure-portal)
322+
323+
1. In your function app page in the [Azure portal](https://portal.azure.com), expand **Settings** in the left menu and select **Scale and concurrency**.
324+
325+
1. Select an **Instance memory** option and select **Save** to update the app.
326+
327+
328+
### [Visual Studio Code](#tab/vs-code)
329+
330+
You can't currently change the instance memory size setting for your app using Visual Studio Code.
331+
332+
---
333+
295334
## Set always ready instance counts
296335

297-
When creating an app in a Flex Consumption plan, you can set the always ready instance count for specific groups (HTTP or Durable triggers) and triggers by using the `--always-ready-instances` parameter. If you don't want any always ready instances, just leave this optional parameter out of your [`az functionapp create`] command. You can also change always ready instances on an existing app.
336+
When creating an app in a Flex Consumption plan, you can set the always ready instance count for specific groups (HTTP or Durable triggers) and triggers.
337+
338+
### [Azure CLI](#tab/azure-cli)
298339

299-
This example sets the always ready instance count for all HTTP triggered functions to `5`:
340+
Use the `--always-ready-instances` parameter with the [`az functionapp create`] command to define one or more always ready instance designations. This example sets the always ready instance count for all HTTP triggered functions to `5`:
300341

301342
```azurecli
302-
az functionapp create --resource-group <RESOURCE_GROUP> --name <APP_NAME> -s <storageAccountName> --runtime <runtime> --runtime-version <runtime-version> --flexconsumption-location "<azureRegion>" --always-ready-instances http=10
343+
az functionapp create --resource-group <RESOURCE_GROUP> --name <APP_NAME> --storage <STORAGE_NAME> --runtime <LANGUAGE_RUNTIME> --runtime-version <RUNTIME_VERSION> --flexconsumption-location <REGION> --always-ready-instances http=10
303344
```
304345

305346
This example sets the always ready instance count for all Durable trigger functions to `3` and sets the always ready instance count to `2` for a service bus triggered function named `function5`:
306347

307348
```azurecli
308-
az functionapp create --resource-group <RESOURCE_GROUP> --name <APP_NAME> -s <storageAccountName> --runtime <runtime> --runtime-version <runtime-version> --flexconsumption-location "<azureRegion>" --always-ready-instances durable=3 function5=2
349+
az functionapp create --resource-group <RESOURCE_GROUP> --name <APP_NAME> --storage <STORAGE_NAME> --runtime <LANGUAGE_RUNTIME> --runtime-version <RUNTIME_VERSION> --flexconsumption-location <REGION> --always-ready-instances durable=3 function5=2
309350
```
310351

352+
### [Azure portal](#tab/azure-portal)
353+
354+
You can't currently define always ready instances when creating your app in the Azure portal. To define always ready instances during app creation, instead use the Azure CLI to create your app.
355+
356+
You can use the portal to modify always ready instances on an existing app, as detailed in the next section.
357+
358+
### [Visual Studio Code](#tab/vs-code)
359+
360+
You can't currently define always ready instances when creating your app in Azure using Visual Studio Code.
361+
362+
---
363+
364+
You can also modify always ready instances on an existing app by adding or removing instance designations or by changing existing instance designation counts.
365+
366+
### [Azure CLI](#tab/azure-cli)
367+
311368
This example uses the [`az functionapp scale config always-ready set`](/cli/azure/functionapp/scale/config/always-ready#az-functionapp-scale-config-always-ready-set) command to change the always ready instance count for the HTTP triggers group to `10`:
312369

313370
```azurecli
@@ -320,18 +377,55 @@ To remove always ready instances, use the [`az functionapp scale config always-r
320377
az functionapp scale config always-ready delete --resource-group <RESOURCE_GROUP> --name <APP_NAME> --setting-names http hello_world
321378
```
322379

380+
### [Azure portal](#tab/azure-portal)
381+
382+
1. In your function app page in the [Azure portal](https://portal.azure.com), expand **Settings** in the left menu and select **Scale and concurrency**.
383+
384+
1. Under **Always-ready instance minimum** type `http`, `blob`, `durable`, or a specific function name in **Trigger** and type the **Number of always-ready instances**.
385+
386+
1. Select **Save** to update the app.
387+
388+
### [Visual Studio Code](#tab/vs-code)
389+
390+
You can't currently modify always ready instances using Visual Studio Code.
391+
392+
---
393+
323394
## Set HTTP concurrency limits
324395

325396
By default, HTTP concurrency defaults for Flex Consumption plan apps are determined based on your instance size setting. For more information, see [HTTP trigger concurrency](functions-concurrency.md#http-trigger-concurrency).
326397

327-
You can use the [`az functionapp scale config set`](/cli/azure/functionapp/scale/config#az-functionapp-scale-config-set) command to set specific HTTP concurrency limits for your app, regardless of instance size.
398+
### [Azure CLI](#tab/azure-cli)
399+
400+
Use the [`az functionapp scale config set`](/cli/azure/functionapp/scale/config#az-functionapp-scale-config-set) command to set specific HTTP concurrency limits for your app, regardless of instance size.
328401

329402
```azurecli
330403
az functionapp scale config set -resource-group <RESOURCE_GROUP> -name <APP_NAME> --trigger-type http --trigger-settings perInstanceConcurrency=10
331404
```
332405

333406
This example sets the HTTP trigger concurrency level to `10`. After you specifically set an HTTP concurrency value, that value is maintained despite any changes in your app's instance size setting.
334407

408+
### [Azure portal](#tab/azure-portal)
409+
410+
1. In your function app page in the [Azure portal](https://portal.azure.com), expand **Settings** in the left menu and select **Scale and concurrency**.
411+
412+
1. Under **Concurrency per instance** select **Assign manually** and type a specific limit.
413+
414+
1. Select **Save** to update the app.
415+
416+
### [Visual Studio Code](#tab/vs-code)
417+
418+
You can't currently modify always ready instances using Visual Studio Code.
419+
420+
---
421+
422+
## View currently supported regions
423+
424+
During the preview, you're only able to run on the Flex Consumption plan in selected regions. To view the list of regions that currently support Flex Consumption plans:
425+
426+
[!INCLUDE [functions-flex-supported-regions-cli](../../includes/functions-flex-supported-regions-cli.md)]
427+
428+
When you create an app in the [Azure portal](flex-consumption-how-to.md?tabs=azure-portal#create-a-flex-consumption-app) or by using [Visual Studio Code](flex-consumption-how-to.md?tabs=vs-code#create-a-flex-consumption-app), currently unsupported regions are filtered out of the region list.
335429

336430
## Related content
337431

articles/azure-functions/functions-app-settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ In the [Flex Consumption plan](./flex-consumption-plan.md), these site propertie
846846
| `properties.netFrameworkVersion` |Replaced by `version` in `properties.functionAppConfig.runtime`|
847847
| `properties.LinuxFxVersion` |Replaced by `properties.functionAppConfig.runtime`|
848848
| `WEBSITE_NODE_DEFAULT_VERSION` |Replaced by `version` in `properties.functionAppConfig.runtime`|
849-
| `FUNCTIONS_EXTENSION_VERSION` |App Setting will be set by the backend to the right value|. You may notice this setting being set to ~1 by the backend, this can be ignored.
849+
| `FUNCTIONS_EXTENSION_VERSION` |App Setting is set by the backend. A value of ~1 can be ignored. |
850850
| `FUNCTIONS_WORKER_RUNTIME` |Replaced by `name` in `properties.functionAppConfig.runtime`|
851851
| `FUNCTIONS_WORKER_RUNTIME_VERSION` |Replaced by `version` in `properties.functionAppConfig.runtime`|
852852
| `FUNCTIONS_MAX_HTTP_CONCURRENCY` |App Setting replaced by scale and concurrency's trigger section|
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
author: ggailey777
3+
ms.service: azure-functions
4+
ms.topic: include
5+
ms.date: 05/012/2024
6+
ms.author: glenga
7+
---
8+
1. If you haven't done so already, sign in to Azure:
9+
10+
```azurecli
11+
az login
12+
```
13+
14+
The [`az login`](/cli/azure/reference-index#az-login) command signs you into your Azure account.
15+
16+
2. Use the `az functionapp list-flexconsumption-locations` command to review the list of regions that currently support Flex Consumption.
17+
18+
```azurecli-interactive
19+
az functionapp list-flexconsumption-locations --output table
20+
```

0 commit comments

Comments
 (0)