While creating Azure Functions, we must choose a hosting plan for the App. There are 3 basic plans named App Service Plan(dedicated), Consumption, and Premium plans and all these plans are available in Windows and Linux VM’s.
Let's look at what plan provides which features and based on these features and your needs you can select the right plan.
Feature/Plan | Consumption | Premium | Dedicated | Scaling | Automatically based on incoming requests | Automatically with pre-warmed instances so that no delays | Predictive scaling or Manual | Scale Out Max# instances | Windows - 200 Linux - 100
| Windows - 100 Linux - 20-100 | 10-20 | Cold start | With Idle scenario, scale goes to 0 and we have latency to scale | With Pre-warming feature there is no latency | NA - function app runs continuously | Default Plan | Yes | No | No | VNET connectivity | No | Yes | Yes | App timeout(Min) | 5 mins | 30 mins | 30 mins | App time out(Max) | 10 mins | unlimited | unlimited | Billing | Pay only for the time when App runs | Pay as per runs plus pre warms | Pay as per App Service Plan | When to consider | - Scale automatically
- Pay only when you run
| - App requires continuous run
- You need more CPU, memory and high GB seconds than consumption plan
- More execution time than consumption plan
- VNET connectivity
| - Want to re-use existing App Service Plan
- Predictive scaling and cost requirements
|
Other than these 3 basic plans, we have App Service Environment(ASE) and Kubernetes isolation plans, do refer Microsoft documentation.
|