With a consumption plan, you don't have a dedicated set of resources, but your Azure functions are hosted on a pool of resources based on the number of incoming events.
Here are the main things to consider when choosing a consumption plan:
- You pay only when your functions are running and you pay based on the execution time, memory used, and the number of executions. After a certain period of inactivity, your function times out and will be removed, and you stop paying for the execution time and memory used.
- Functions scale out automatically; you don't have to configure anything.
- Function apps in the same region can share the same consumption plan.
- Since you don't have a dedicated resource, some advanced features, such as Visual Studio Live Debugging and VNet connectivity, are not available when using a consumption plan.
With the app service plan (dedicated plan), you have a fixed set of resources (virtual machines) allocated to run your Azure functions.
Here are the main things to consider when choosing an app service plan:
- You pay for the virtual machines that are included in your app service plan, regarding the usage.
- You can scale your app service plan up and down, based on time and other metrics, and you'll pay accordingly. Scaling occurs every five minutes with an app service plan.
- You can share the same app service plan for Azure Functions and other web apps. If you already have other web apps in your subscription, with spare capacity, you can use that capacity to run your Azure functions (if it's enough).
- Since you have dedicated resources, you can use advanced features, such as Visual Studio Live Debugging and VNet connectivity.
- Since you have dedicated resources, you must keep your Azure functions alive and never time out, by choosing the Always on setting .
If you're using an HTTP triggered function, please remember that there is a timeout of 230 seconds to respond to a request. This timeout is set by Azure Load Balancer. You should consider using Durable Functions if you need more time.