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/container-concepts.md
+47-6Lines changed: 47 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,27 +4,69 @@ description: Describes the options for and benefits of running your function cod
4
4
ms.service: azure-functions
5
5
ms.custom: build-2024, linux-related-content
6
6
ms.topic: concept-article
7
-
ms.date: 04/05/2024
7
+
ms.date: 10/13/2024
8
8
9
9
#CustomerIntent: As a developer, I want to understand the options that are available to me for hosting function apps in Linux containers so I can choose the best development and deployment options for containerized deployments of function code to Azure.
10
10
---
11
11
12
12
# Linux container support in Azure Functions
13
13
14
-
When you plan and develop your individual functions to run in Azure Functions, you are typically focused on the code itself. Azure Functions makes it easy to deploy just your code project to a function app in Azure. When you deploy your code project to a function app that runs on Linux, the project runs in a container that is created for you automatically. This container is managed by Functions.
14
+
When you plan and develop your individual functions to run in Azure Functions, you're typically focused on the code itself. Azure Functions makes it easy to deploy just your code project to a function app in Azure. When you deploy your code project to a function app that runs on Linux, the project runs in a container that is created for you automatically. This container is managed by Functions.
15
15
16
16
Functions also supports containerized function app deployments. In a containerized deployment, you create your own function app instance in a local Docker container from a supported based image. You can then deploy this _containerized_ function app to a hosting environment in Azure. Creating your own function app container lets you customize or otherwise control the immediate runtime environment of your function code.
There are several options for hosting your containerized function apps in Azure:
21
23
22
24
| Hosting option | Benefits |
23
25
| --- | --- |
24
-
|**[Azure Container Apps]**| Azure Functions provides integrated support for developing, deploying, and managing containerized function apps on [Azure Container Apps](../container-apps/overview.md). Use Azure Container Apps to host your function app containers when you need to run your event-driven functions in Azure in the same environment as other microservices, APIs, websites, workflows, or any container hosted programs. Container Apps hosting lets you run your functions in a managed Kubernetes-based environment with built-in support for open-source monitoring, mTLS, Dapr, and KEDA. Container Apps uses the power of the underlying Azure Kubernetes Service (AKS) while removing the complexity of having to work with Kubernetes APIs.|
26
+
|**[Azure Container Apps]**| Azure Functions provides integrated support for developing, deploying, and managing containerized function apps on [Azure Container Apps](../container-apps/overview.md). This enables you to manage your apps using the same Functions tools and pages in the Azure portal. Use Azure Container Apps to host your function app containers when you need to run your event-driven functions in Azure in the same environment as other microservices, APIs, websites, workflows, or any container hosted programs. Container Apps hosting lets you run your functions in a managed Kubernetes-based environment with built-in support for open-source monitoring, mTLS, Dapr, and KEDA. Supports scale-to-zero and provides a servless pay-for-what-you-use hosting model. You can also request dedicated hardware, even GPUs, by using workload profiles. _Recommended hosting option for running containerized function apps on Azure._|
25
27
|**Azure Arc-enabled Kubernetes clusters (preview)**| You can host your function apps on Azure Arc-enabled Kubernetes clusters as either a [code-only deployment](./create-first-function-arc-cli.md) or in a [custom Linux container](./create-first-function-arc-custom-container.md). Azure Arc lets you attach Kubernetes clusters so that you can manage and configure them in Azure. _Hosting Azure Functions containers on Azure Arc-enabled Kubernetes clusters is currently in preview._|
26
-
|**[Azure Functions]**| You can deploy your containerized function apps to run in either an [Elastic Premium plan](./functions-premium-plan.md) or a [Dedicated plan](./dedicated-plan.md). Premium plan hosting provides you with the benefits of dynamic scaling. You might want to use Dedicated plan hosting to take advantage of existing unused App Service plan resources. |
27
-
|**[Kubernetes]**| Because the Azure Functions runtime provides flexibility in hosting where and how you want, you can host and manage your function app containers directly in Kubernetes clusters. [KEDA](https://keda.sh) (Kubernetes-based Event Driven Autoscaling) pairs seamlessly with the Azure Functions runtime and tooling to provide event driven scale in Kubernetes. Just keep in mind that running your containerized function apps on Kubernetes, either by using KEDA or by direct deployment, is an open-source effort that you can use free of cost, with best-effort support provided by contributors and from the community. |
28
+
|**[Azure Functions]**| You can host your containerized function apps in Azure Functions by running the container in either an [Elastic Premium plan](./functions-premium-plan.md) or a [Dedicated plan](./dedicated-plan.md). Premium plan hosting provides you with the benefits of dynamic scaling. You might want to use Dedicated plan hosting to take advantage of existing unused App Service plan resources. |
29
+
|**[Kubernetes]**| Because the Azure Functions runtime provides flexibility in hosting where and how you want, you can host and manage your function app containers directly in Kubernetes clusters. [KEDA](https://keda.sh) (Kubernetes-based Event Driven Autoscaling) pairs seamlessly with the Azure Functions runtime and tooling to provide event driven scale in Kubernetes. Just keep in mind that running your containerized function apps on Kubernetes, either by using KEDA or by direct deployment, is an open-source effort that you can use free of cost, with best-effort support provided by contributors and from the community. You're responsible for maintaining your own function app containers in a cluster, even when deploying to Azure Kubernetes Service (AKS). |
30
+
31
+
## Feature support comparison
32
+
33
+
The degree to which various features and behaviors of Azure Functions are supported when running your function app in a container depends on the container hosting option you choose.
|[Core Tools deployment](./functions-run-local.md#deploy-containers)|[`func azurecontainerapps`](./functions-core-tools-reference.md#func-azurecontainerapps-deploy)| No | No | No |[`func kubernetes`](./functions-core-tools-reference.md#func-kubernetes-deploy)|
44
+
|[Revisions](../container-apps/revisions.md)| No | Yes |No |No |No |
| Diagnostics | Not currently available<sup>4</sup> |[Yes](../container-apps/troubleshooting.md#use-the-diagnose-and-solve-problems-tool)|[Yes](./functions-diagnostics.md)|[Yes](./functions-diagnostics.md)| No |
| Dedicated GPUs | Yes ([workload profiles](../container-apps/workload-profiles-overview.md)) | Yes ([workload profiles](../container-apps/workload-profiles-overview.md)) | No | No | Yes |
57
+
|[Configurable memory/CPU count](../container-apps/workload-profiles-overview.md)| Yes | Yes | No | No | Yes |
58
+
| "Free grant" option |[Yes](../container-apps/billing.md#consumption-plan)|[Yes](../container-apps/billing.md#consumption-plan)| No | No | No |
59
+
| Pricing details |[Container Apps billing](../container-apps/billing.md)|[Container Apps billing](../container-apps/billing.md)|[Premium plan billing](./functions-premium-plan.md#billing)|[Dedicated plan billing](./dedicated-plan.md#billing)|[AKS pricing](/azure/aks/free-standard-pricing-tiers)|
60
+
| Service name requirements | 2-32 characters: limited to lowercase letters, numbers, and hyphens. Must start with a letter and end with an alphanumeric character. | 2-32 characters: limited to lowercase letters, numbers, and hyphens. Must start with a letter and end with an alphanumeric character. | Less than 64 characters: limited to alphanumeric characters and hyphens. Can't start with or end in a hyphen. | Less than 64 characters: limited to alphanumeric characters and hyphens. Can't start with or end in a hyphen. | Less than 253 characters: limited to alphanumeric characters and hyphens. Must start and end with an alphanumeric character. |
61
+
62
+
1. On Container Apps, the default is 10 instances, but you can set the [maximum number of replicas](../container-apps/scale-app.md#scale-definition), which has an overall maximum of 1000. This setting is honored as long as there's enough cores quota available. When you create your function app from the Azure portal, you're limited to 300 instances.
63
+
2. In some regions, Linux apps on a Premium plan can scale to 100 instances. For more information, see the [Premium plan article](functions-premium-plan.md#region-max-scale-out). <br/>
64
+
3. For specific limits for the various App Service plan options, see the [App Service plan limits](../azure-resource-manager/management/azure-subscription-service-limits.md#app-service-limits).
65
+
4. Feature parity is a goal of integrated hosting on Azure Container Apps.
66
+
5. Requires [KEDA](./functions-kubernetes-keda.md); supported by most triggers. To learn which triggers support event-driven scaling, see [Considerations for Container Apps hosting](functions-container-apps-hosting.md#considerations-for-container-apps-hosting).
67
+
6. When the [minimum number of replicas](../container-apps/scale-app.md#scale-definition) is set to zero, the default timeout depends on the specific triggers used in the app.
68
+
7. There's no maximum execution timeout duration enforced. However, the grace period given to a function execution is 60 minutes [during scale in](event-driven-scaling.md#scale-in-behaviors), and a grace period of 10 minutes is given during platform updates.
69
+
8. Requires the App Service plan be set to [Always On](dedicated-plan.md#always-on). A grace period of 10 minutes is given during platform updates.
28
70
29
71
## Getting started
30
72
@@ -45,4 +87,3 @@ There are several options for hosting your containerized function apps in Azure:
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-app-settings.md
+21-6Lines changed: 21 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Application settings in a function app contain configuration options that affect
14
14
15
15
In this article, example connection string values are truncated for readability.
16
16
17
-
Because Azure Functions leverages the Azure App Service platform for hosting, you might find some settings relevant to your function app hosting documented in [Environment variables and app settings in Azure App Service](../app-service/reference-app-settings.md).
17
+
Because Azure Functions uses the Azure App Service platform for hosting, you might find some settings relevant to your function app hosting documented in [Environment variables and app settings in Azure App Service](../app-service/reference-app-settings.md).
18
18
19
19
## App setting considerations
20
20
@@ -75,8 +75,8 @@ This authentication requirement is applied to connections from the Functions hos
75
75
76
76
The connection string for Application Insights. Don't use both `APPINSIGHTS_INSTRUMENTATIONKEY` and `APPLICATIONINSIGHTS_CONNECTION_STRING`. While the use of `APPLICATIONINSIGHTS_CONNECTION_STRING` is recommended in all cases, it's required in the following cases:
77
77
78
-
+ When your function app requires the added customizations supported by using the connection string.
79
-
+ When your Application Insights instance runs in a sovereign cloud, which requires a custom endpoint.
78
+
+ When your function app requires the added customizations supported by using the connection string
79
+
+ When your Application Insights instance runs in a sovereign cloud, which requires a custom endpoint
80
80
81
81
For more information, see [Connection strings](/azure/azure-monitor/app/sdk-connection-string).
82
82
@@ -189,7 +189,7 @@ When this app setting is omitted or set to `false`, a page similar to the follow
189
189
190
190
## AzureWebJobsDotNetReleaseCompilation
191
191
192
-
`true` means use Release mode when compiling .NET code; `false` means use Debug mode. Default is `true`.
192
+
`true` means use `Release` mode when compiling .NET code; `false` means use Debug mode. Default is `true`.
193
193
194
194
|Key|Sample value|
195
195
|---|------------|
@@ -438,7 +438,7 @@ For Node.js v18 or lower, the app setting is used, and the default behavior depe
438
438
439
439
## FUNCTIONS\_REQUEST\_BODY\_SIZE\_LIMIT
440
440
441
-
Overrides the default limit on the body size of requests sent to HTTP endpoints. The value is given in bytes, with a default maximum request size of 104857600 bytes.
441
+
Overrides the default limit on the body size of requests sent to HTTP endpoints. The value is given in bytes, with a default maximum request size of 104,857,600 bytes.
442
442
443
443
|Key|Sample value|
444
444
|---|------------|
@@ -812,6 +812,21 @@ Indicates whether the `/home` directory is shared across scaled instances, with
812
812
813
813
Some configurations must be maintained at the App Service level as site settings, such as language versions. These settings are managed in the portal, by using REST APIs, or by using Azure CLI or Azure PowerShell. The following are site settings that could be required, depending on your runtime language, OS, and versions:
814
814
815
+
## AcrUseManagedIdentityCreds
816
+
817
+
Indicates whether the image is obtained from an Azure Container Registry instance using managed identity authentication. A value of `true` requires that managed identity be used, which is recommended over stored authentication credentials as a security best practice.
818
+
819
+
## AcrUserManagedIdentityID
820
+
821
+
Indicates the managed identity to use when obtaining the image from an Azure Container Registry instance. Requires that `AcrUseManagedIdentityCreds` is set to `true`. These are the valid values:
822
+
823
+
| Value | Description |
824
+
| ---- | ---- |
825
+
|`system`| The system assigned managed identity of the function app is used. |
826
+
|`<USER_IDENTITY_RESOURCE_ID>`| The fully qualified resource ID of a user-assigned managed identity. |
827
+
828
+
The identity that you specify must be added to the `ACRPull` role in the container registry. For more information, see [Create and configure a function app on Azure with the image](functions-deploy-container-apps.md?tabs=acr#create-and-configure-a-function-app-on-azure-with-the-image).
829
+
815
830
## alwaysOn
816
831
817
832
On a function app running in a [Dedicated (App Service) plan](./dedicated-plan.md), the Functions runtime goes idle after a few minutes of inactivity, a which point only requests to an HTTP trigger _wakes up_ your function app. To make sure that your non-HTTP triggered functions run correctly, including Timer trigger functions, enable Always On for the function app by setting the `alwaysOn` site setting to a value of `true`.
@@ -894,7 +909,7 @@ In the [Flex Consumption plan](./flex-consumption-plan.md), these site propertie
894
909
|`WEBSITE_CONTENTAZUREFILECONNECTIONSTRING`|Replaced by functionAppConfig's deployment section|
895
910
|`WEBSITE_CONTENTOVERVNET`|Not used for networking in Flex Consumption|
896
911
|`WEBSITE_CONTENTSHARE`|Replaced by functionAppConfig's deployment section|
897
-
|`WEBSITE_DNS_SERVER`|DNS is inherited from the integrated VNet in Flex|
912
+
|`WEBSITE_DNS_SERVER`|DNS is inherited from the integrated virtual network in Flex|
898
913
|`WEBSITE_NODE_DEFAULT_VERSION`|Replaced by `version` in `properties.functionAppConfig.runtime`|
899
914
|`WEBSITE_RUN_FROM_PACKAGE`|Not used for deployments in Flex Consumption|
900
915
|`WEBSITE_SKIP_CONTENTSHARE_VALIDATION`|Content share is not used in Flex Consumption|
0 commit comments