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
+46-5Lines changed: 46 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,20 +11,62 @@ ms.date: 04/05/2024
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). 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.<br/><br/>When you use Container Apps integration, you can deploy, view, and manage your apps much like apps in a Functions-hosted container. You can also host a containerized function app directly in Container Apps without this integration.|
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.
| Functions portal integration | Yes | No | Yes | Yes | No |
39
+
|[Event-driven scaling](./event-driven-scaling.md)| Yes<sup>5</sup> | Yes ([scale rules](../container-apps/scale-app.md#scale-rules)) | Yes | No | No |
40
+
| Maximum scale (instances) | 1000<sup>1</sup> | 1000<sup>1</sup> | 100sup>2</sup> | 10-30<sup>3</sup> | varies by cluster |
41
+
|[Scale-to-zero instances](./event-driven-scaling.md#scale-in-behaviors)| Yes | Yes | No | No | KEDA |
42
+
| Deployment: Core Tools |[`func azurecontainerapps`](./functions-core-tools-reference.md#func-azurecontainerapps-deploy)| No | No | No |[`func kubernetes`](./functions-core-tools-reference.md#func-kubernetes-deploy)|
43
+
| Multiple [revisions](../container-apps/revisions.md)| No | Yes |No |No |No |
|[Advanced tools (Kudu)](./functions-how-to-use-azure-function-app-settings.md#advanced-tools-kudu)| No | No | Yes | Yes | No |
46
+
|[Streaming logs](./streaming-logs.md)| Not currently available<sup>4</sup> |[Yes](../container-apps/log-streaming.md)| Yes | Yes | No |
47
+
| Console access | Not currently available<sup>4</sup> |[Yes](../container-apps/container-console.md)| Yes([Kudu](./functions-how-to-custom-container.md#enable-ssh-connections)) | Yes ([Kudu](./functions-how-to-custom-container.md#enable-ssh-connections)) | Yes ([`kubctl`](https://kubernetes.io/docs/reference/kubectl/)) |
48
+
| Cold start mitigation | Minimum replicas | DIY mode | Can configure min instances to avoid cold start issues | Can configure min instances to avoid cold start issues | DIY mode |
49
+
|[Built-in authentication](../app-service/overview-authentication-authorization.md)| Not currently available<sup>4</sup> | Yes | Yes | Yes | No |
50
+
|[Custom domain names](../app-service/app-service-web-tutorial-custom-domain.md)| Not currently available<sup>4</sup> | Yes | Yes | Yes | No |
51
+
|[Private key certificates](../app-service/overview-tls.md)| Not currently available<sup>4</sup> | Yes | Yes | Yes | No |
52
+
| Diagnostics | Not currently available<sup>4</sup> |[Yes](../container-apps/troubleshooting.md#use-the-diagnose-and-solve-problems-tool)| Yes | Yes | No |
| "Free grant" option |[Yes](../container-apps/billing#consumption-plan.md)|[Yes](../container-apps/billing#consumption-plan.md)| No | No | No |
60
+
| 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)|
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). Currently supported for these trigger types: Event Hubs, Queue storage, Kafka, Service Bus, Timer, and HTTP. Not currently supported for Blob storage, Event Grid, Durable, Redis, and Cosmos DB triggers.
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-core-tools-reference.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
@@ -570,7 +570,7 @@ The following Kubernetes deployment options are available:
570
570
571
571
Core Tools uses the local Docker CLI to build and publish the image. Make sure your Docker is already installed locally. Run the `docker login` command to connect to your account.
572
572
573
-
To learn more, see [Deploying a function app to Kubernetes](functions-kubernetes-keda.md#deploying-a-function-app-to-kubernetes).
573
+
Azure Functions supports hosting your containerized functions either in Azure Container Apps or in Azure Functions. Running your containers directly in a Kubernetes cluster or in Azure Kubernetes Service (AKS) isn't officially supported by Azure Functions. To learn more, see [Linux container support in Azure Functions](container-concepts.md).
Copy file name to clipboardExpand all lines: articles/azure-functions/streaming-logs.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,9 @@ While developing an application, you often want to see what's being written to t
14
14
15
15
There are two ways to view a stream of log files being generated by your function executions.
16
16
17
-
***Built-in log streaming**: the App Service platform lets you view a stream of your application log files. This is equivalent to the output seen when you debug your functions during [local development](functions-develop-local.md) and when you use the **Test** tab in the portal. All log-based information is displayed. For more information, see [Stream logs](../app-service/troubleshoot-diagnostic-logs.md#stream-logs). This streaming method supports only a single instance, and can't be used with an app running on Linux in a Consumption plan. When your function is scaled to multiple instances, data from other instances isn't shown using this method.
17
+
***Live Metrics Stream (recommended)**: when your function app is [connected to Application Insights](configure-monitoring.md#enable-application-insights-integration), you can view log data and other metrics in near real-time in the Azure portal using [Live Metrics Stream](/azure/azure-monitor/app/live-stream). Use this method when monitoring functions running on multiple-instances and supports all plan types. This method uses [sampled data](configure-monitoring.md#configure-sampling).
18
18
19
-
***Live Metrics Stream**: when your function app is [connected to Application Insights](configure-monitoring.md#enable-application-insights-integration), you can view log data and other metrics in near real-time in the Azure portal using [Live Metrics Stream](/azure/azure-monitor/app/live-stream). Use this method when monitoring functions running on multiple-instances and supports all plan types. This method uses [sampled data](configure-monitoring.md#configure-sampling).
19
+
***Built-in log streaming**: the App Service platform lets you view a stream of your application log files. This is equivalent to the output seen when you debug your functions during [local development](functions-develop-local.md) and when you use the **Test** tab in the portal. All log-based information is displayed. For more information, see [Stream logs](../app-service/troubleshoot-diagnostic-logs.md#stream-logs). This streaming method supports only a single instance, and can't be used with an app running on Linux in a Consumption plan. When your function is scaled to multiple instances, data from other instances isn't shown using this method.
20
20
21
21
Log streams can be viewed both in the portal and in most local development environments.
1. Regardless of the function app timeout setting, 230 seconds is the maximum amount of time that an HTTP triggered function can take to respond to a request. This is because of the [default idle timeout of Azure Load Balancer](../articles/app-service/faq-availability-performance-application-issues.yml#why-does-my-request-time-out-after-230-seconds-). For longer processing times, consider using the [Durable Functions async pattern](../articles/azure-functions/durable/durable-functions-overview.md#async-http) or [defer the actual work and return an immediate response](../articles/azure-functions/performance-reliability.md#avoid-long-running-functions).
25
25
2. There is no maximum execution timeout duration enforced. However, the grace period given to a function execution is 60 minutes [during scale in](../articles/azure-functions/event-driven-scaling.md#scale-in-behaviors) for the Flex Consumption and Premium plans, and a grace period of 10 minutes is given during platform updates.
0 commit comments