Overview:
When you create a function app in Azure, you must choose a hosting plan for your app. There are three basic Azure Functions hosting plans provided by Azure Functions:
Premium plan, and
These hosting plans are facilitated by Azure App Service infrastructure and are generally available (GA) on both Linux and Windows virtual machines.
How do you choose Azure Function deployment options?
The Azure Functions hosting plan you choose dictates the following behaviors:
- How your function app is scaled.
- The resources available to each function app instance.
- Support for advanced functionality, such as Azure Virtual Network connectivity.
In addition to Azure Functions hosting, you can also host containerized function apps in containers that can be deployed to Kubernetes clusters or to Azure Container Apps. If you choose to host your functions in a Kubernetes cluster, consider using an Azure Arc-enabled Kubernetes cluster.
Overview of plans
The following is a summary of the three main Azure Functions hosting plans:
| Deployment option | Brief description | When to use | Benefits | Limitations |
| Consumption plan | The serverless hosting option for Azure Functions. You only pay for the time your functions run. Azure scales the resources needed to run your functions automatically. | When you have event-driven, stateless, or short-lived functions that do not require a fixed number of VMs or instances. | – Low cost and high scalability. No need to manage infrastructure or servers. Supports a variety of triggers and bindings. | – Cold start latency for the first execution or after idle periods. Limited execution duration (up to 10 minutes). No support for VNet integration or custom domains. |
| Premium plan | A hosting option that provides the same features as the Consumption plan, but with enhanced performance and additional capabilities. You can pre-warm instances to avoid cold start, and you can run functions for longer durations. You also have more control over scaling and networking. | When you need more consistent performance, longer execution times, or more advanced features for your functions. | – All the benefits of the Consumption plan, plus: – No cold start latency with pre-warmed instances. – Longer execution duration (up to 60 minutes). – Support for VNet integration and custom domains. – Ability to configure minimum and maximum scale. | – Higher cost than the Consumption plan. – Requires more configuration and management. |
| Dedicated (App Service) plan | A hosting option that runs your functions on dedicated VMs or instances, similar to how App Service web apps are hosted. You have full control over the scaling, networking, and configuration of your functions. | When you have functions that require a fixed number of VMs or instances, or when you want to share the same App Service plan with other App Service apps or functions. | – Full control and flexibility over the hosting environment. – Support for VNet integration and custom domains. – Ability to run functions on Linux or Windows. – Ability to run functions in an isolated environment. | – Highest cost among the three options. – No automatic scaling based on demand. – Requires more configuration and management. |
Benefits:
| Plan | Benefits |
| Consumption plan | Scale automatically and only pay for compute resources when your functions are running. On the Consumption plan, instances of the Functions host are dynamically added and removed based on the number of incoming events. ✔ Default hosting plan. ✔ Pay only when your functions are running. ✔ Scales automatically, even during periods of high load. |
| Premium plan | Automatically scales based on demand using pre-warmed workers, which run applications with no delay after being idle, runs on more powerful instances, and connects to virtual networks. Consider the Azure Functions Premium plan in the following situations: ✔ Your function apps run continuously, or nearly continuously. ✔ You have a high number of small executions and a high execution bill, but low GB seconds in the Consumption plan. ✔ You need more CPU or memory options than what is provided by the Consumption plan. ✔ Your code needs to run longer than the maximum execution time allowed on the Consumption plan. ✔ You require features that aren’t available on the Consumption plan, such as virtual network connectivity. ✔ You want to provide a custom Linux image on which to run your functions. |
| Dedicated plan | Run your functions within an App Service plan at regular App Service plan rates. Best for long-running scenarios where Durable Functions can’t be used. Consider an App Service plan in the following situations: ✔ You have existing, underutilized VMs that are already running other App Service instances. ✔ Predictive scaling and costs are required. |
Hosting options details:
| Hosting option | Details |
| ASE | App Service Environment (ASE) is an App Service feature that provides a fully isolated and dedicated environment for securely running App Service apps at high scale. ASEs are appropriate for application workloads that require: ✔ Very high scale. ✔ Full compute isolation and secure network access. ✔ High memory usage. |
| Azure Container Apps | Azure Container Apps is a fully managed environment that enables you to run microservices and containerized applications on a serverless platform. Azure Container Apps let you run your functions with the power of the underlying Azure Kubernetes Service (AKS) while removing the complexity of having to work with Kubernetes APIs. |
| Kubernetes (Direct or Azure Arc) | Kubernetes provides a fully isolated and dedicated environment running on top of the Kubernetes platform. Kubernetes is appropriate for application workloads that require: ✔ Custom hardware requirements. ✔ Isolation and secure network access. ✔ Ability to run in hybrid or multi-cloud environment. ✔ Run alongside existing Kubernetes applications and services. |
Function app timeout duration
The timeout duration for functions in a function app is defined by the functionTimeout property in the host.json project file. This property applies specifically to function executions. After the trigger starts function execution, the function needs to return/respond within the timeout duration. For more information, see Improve Azure Functions performance and reliability.
The following table shows the default and maximum values (in minutes) for specific plans:
| Plan | Default | Maximum1 |
| Consumption plan | 5 | 10 |
| Premium plan | 302 | Unlimited3 |
| Dedicated plan | 302 | Unlimited3 |
Scale
From <https://learn.microsoft.com/en-us/azure/azure-functions/functions-scale#overview-of-plans>
The following table compares the scaling behaviors of the various hosting plans.
Maximum instances are given on a per-function app (Consumption) or per-plan (Premium/Dedicated) basis, unless otherwise indicated.
| Plan | Scale out | Max # instances |
| Consumption plan | Event driven. Scale out automatically, even during periods of high load. Azure Functions infrastructure scales CPU and memory resources by adding additional instances of the Functions host, based on the number of incoming trigger events. | Windows: 200 Linux: 1001 |
| Premium plan | Event driven. Scale out automatically, even during periods of high load. Azure Functions infrastructure scales CPU and memory resources by adding additional instances of the Functions host, based on the number of events that its functions are triggered on. | Windows: 100 Linux: 20-1002 |
| Dedicated plan3 | Manual/autoscale | 10-30 |
| ASE3 | Manual/autoscale | 100 |
| Kubernetes | Event-driven autoscale for Kubernetes clusters using KEDA. | Varies by cluster |
Service limits
From <https://learn.microsoft.com/en-us/azure/azure-functions/functions-scale#overview-of-plans>
The comparison tables in this article also include the following hosting options, which provide the highest amount of control and isolation in which to run your function apps.
Expand table
| Resource | Consumption plan | Premium plan | Dedicated plan | ASE | Kubernetes |
| Default timeout duration (min) | 5 | 30 | 301 | 30 | 30 |
| Max timeout duration (min) | 10 | unbounded7 | unbounded2 | unbounded | unbounded |
| Max outbound connections (per instance) | 600 active (1200 total) | unbounded | unbounded | unbounded | unbounded |
| Max request size (MB)3 | 100 | 100 | 100 | 100 | Depends on cluster |
| Max query string length3 | 4096 | 4096 | 4096 | 4096 | Depends on cluster |
| Max request URL length3 | 8192 | 8192 | 8192 | 8192 | Depends on cluster |
| ACU per instance | 100 | 210-840 | 100-840 | 210-2508 | AKS pricing |
| Max memory (GB per instance) | 1.5 | 3.5-14 | 1.75-14 | 3.5 – 14 | Any node is supported |
| Max instance count (Windows/Linux) | 200/100 | 100/20 | varies by SKU9 | 1009 | Depends on cluster |
| Function apps per plan11 | 100 | 100 | unbounded4 | unbounded | unbounded |
| App Service plans | 100 per region | 100 per resource group | 100 per resource group | – | – |
| Deployment slots per app10 | 2 | 3 | 1-209 | 20 | n/a |
| Storage5 | 5 GB | 250 GB | 50-1000 GB | 1 TB | n/a |
| Custom domains per app | 5006 | 500 | 500 | 500 | n/a |
| Custom domain SSL support | unbounded SNI SSL connection included | unbounded SNI SSL and 1 IP SSL connections included | unbounded SNI SSL and 1 IP SSL connections included | unbounded SNI SSL and 1 IP SSL connections included | n/a |
Networking features
| Feature | Consumption plan | Premium plan | Dedicated plan | ASE |
| Inbound IP restrictions | ✅Yes | ✅Yes | ✅Yes | ✅Yes |
| Inbound Private Endpoints | ❌No | ✅Yes | ✅Yes | ✅Yes |
| Virtual network integration | ❌No | ✅Yes (Regional) | ✅Yes (Regional and Gateway) | ✅Yes |
| Virtual network triggers (non-HTTP) | ❌No | ✅Yes | ✅Yes | ✅Yes |
| Hybrid connections (Windows only) | ❌No | ✅Yes | ✅Yes | ✅Yes |
| Outbound IP restrictions | ❌No | ✅Yes | ✅Yes | ✅Yes |
Billing
From <https://learn.microsoft.com/en-us/azure/azure-functions/functions-scale#overview-of-plans>
| Plan | Details |
| Consumption plan | Pay only for the time your functions run. Billing is based on number of executions, execution time, and memory used. |
| Premium plan | Premium plan is based on the number of core seconds and memory used across needed and pre-warmed instances. At least one instance per plan must always be kept warm. This plan provides the most predictable pricing. |
| Dedicated plan | You pay the same for function apps in an App Service Plan as you would for other App Service resources, like web apps. |
| App Service Environment (ASE) | There’s a flat monthly rate for an ASE that pays for the infrastructure and doesn’t change with the size of the ASE. There’s also a cost per App Service plan vCPU. All apps hosted in an ASE are in the Isolated pricing SKU. |
| Kubernetes | You pay only the costs of your Kubernetes cluster; no additional billing for Functions. Your function app runs as an application workload on top of your cluster, just like a regular app. |
Conclusion
Azure Functions’ various hosting plans ensure that you can select the right balance of performance and cost for your application’s needs. Whether you’re looking for a fully serverless option with the Consumption Plan, more power and features with the Premium Plan, or consistent performance with the Dedicated Plan, Azure Functions has you covered. Container support further enhances its flexibility, making it a robust solution for modern cloud applications. This scalability is a key advantage, allowing your functions to adapt to demand while optimizing costs.

