Hosting Plans in Azure Functions
When you create a function app in Azure, you must choose a hosting plan for your app. Microsoft Azure offers 5 available hosting plans:
- Consumption Plan
- Premium Plan
- Flex Consumption Plan
- App Service Plan
- Kubernetes:
- ASE

These five available hosting plans determine the following behaviours:
- How your function app is scaled
- The (compute) resources available to each function app instance
- Support for advanced features (like Azure Virtual Network connectivity)
Consumption Plan
With a consumption plan, compute instances scale automatically based on incoming requests or events. You're billed only for the time your functions are actually running. Hence, if there is no usage, there are no charges.
Premium Plan
While similar to the consumption plan, the key difference is that within the Premium Plan, you define a number of pre-warmed instances that stay online – and can respond immediately. When your function runs, Azure adds extra compute resources as needed.
Thus, you’re billed for those continuous pre-warmed instances, plus any additional instances used when Azure scales your app. That means you still pay for the pre-warmed instances even if your Function App doesn’t run during a period.
Flex Consumption Plan
The Flex Consumption Plan is a relative new option, made for scenarios demanding flexible scaling and detailed control over compute options.
It offers pay-as-you-go pricing, including optional always-ready instances. Also, it comes with a monthly free grant of 250,000 executions and 100,000 GB-s of resource consumption per subscription across all function apps.
Scaling is automatic: instances increase or decrease based on incoming events and your concurrency settings.
App Service Plan
Using the App Service Plan, you can run your functions like your web apps. If you are already using App Service for your other applications, then your functions can run on the same plan at no additional cost. It's best suited for long-running scenarios where durable functions aren’t an option.
Kubernetes
This plan gives you a fully isolated, dedicated environment running on a Kubernetes cluster.
App Service Environment (ASE)
ASE offers a dedicated and isolated environment for securely running App Service apps at high scale.
How to pick the right Hosting Plan for Azure Functions?
Start with Consumption…
As with many Azure services, the first thing you need to decide is your hosting plan. When it comes to Azure Functions, start with the Consumption Plan – so you pay only for what you use. It handles automatic scaling well during high or unpredictable traffic, offering many of the core benefits of Azure Functions. For most use cases, this plan fits just fine.
Use the Premium Plan if…
Some of your workloads might require than what the Consumption Plan offers. Maybe you’re worried about cold starts. A cold start can be a concern in the Consumption Plan, where the app has to spin up if no instance is running. If your API is used by headless services, this isn’t usually a problem. But if it’s tied to a web app, and you’re concerned about even slight delays after idle periods, you might want to switch to Premium or look into workarounds to keep the function warm.
Therefore, if low latency matters, and your apps run (or nearly) continuously, opt for the Premium Plan. It avoids cold starts by keeping instances warm, so functions respond instantly.
But there are more reasons to pick a Premium Plan:
- Premium also includes features like VNet integration and private endpoints for more secure deployments.
- And for high-volume, low-duration workloads, Premium can actually be cheaper than Consumption, since pricing is based on instances rather than executions.
Pick the App Service Plan…
The App Service Plan is a good choice if your workloads are predictable and you want consistent costs. It also makes sense if you’re already using App Service for your web apps. You can run Function Apps on the same plan to reduce overhead.
Use Kubernetes for your Multi-Cloud environments
Using Kubernetes as hosting plan for your functions is a great choice when dealing with multi-cloud setups or when you need strong on-prem integration. It offers the most flexibility, especially if you're managing workloads across Azure or other cloud providers (AWS, GCP, etc).
The table below gives you a quick overview:
Hosting Plan |
When to pick it |
Consumption (Start here!) |
- You want fully serverless
- Pay only for actual usage
- Need auto-scaling
|
Premium Plan |
- Low latency is important
- High scale with networking features and containers
- Long running Functions
- High number of small executions (save money vs consumption)
|
App Service Plan |
- You want predictable costs
- Need workload isolation
- Already using App Service
|
Kubernetes |
- You need multi-cloud flexibility
- On-premises integration
- Strong isolation
|
Azure Functions Pricing: How Much Does it Cost?
The question that likely lingers in your mind is: “How much does Azure Functions cost me?”
The short answer: it depends on how you use it.
Azure Function Pricing is made up of these main pricing models:
- Consumption
- Premium
- Dedicated (App Service) Plan
1. Consumption Plan
The Consumption Plan is the most widely used pricing model for Azure Functions. It follows a pay-as-you-go approach, where you’re charged based on actual usage.
It charges based on execution count, duration, and resource use:
- It's free up to a generous threshold (a monthly free grant of 1 million requests and 400,000 GB-s of resource usage).
- Beyond that, costs are fractions of a cent per run.
For long-running or high-frequency workloads, that can get expensive.
Let’s break down the pricing for the Consumption Plan:
Metre |
Free Grant (Per Month) |
Pay as you go |
Execution Time |
400,000 GB-s |
$0.000016/GB-s |
Total Executions |
1 million executions |
$0.20 per million executions |
Example
Let’s imagine your function runs for 250 milliseconds and uses 256 MB of memory, the execution cost would be: 0.000016 × 256 × 0.25 = $0.001024 per execution.
If this function runs 2 million times in a month, the total execution cost would be:
2 million × $0.20 per million = $400 for executions alone.