Consumption Plan and App Service Plan
    • Dark
      Light
    • PDF

    Consumption Plan and App Service Plan

    • Dark
      Light
    • PDF

    Article Summary

    #ServerlessTips - Azure Functions
    Author: Steef-Jan Wiggers Azure MVP

    Consumption Plan or App Service Plan – choose the right plan

    You can execute Azure Functions in either a Consumption or an App Service plan.

    With the Consumption plan, you do not have to worry about the dimension of your infrastructure, scaling, or pay when not utilizing any resources.

    For the App Service plan, however, you do need to allocate resources for your functions explicitly and pay for them regardless if you are running functions or not.

    On a consumption plan instances of your function hosts are dynamically added and removed based on the workload for your functions. For instance, when ingesting a large amount of telemetry data through event hubs and process that data through functions, the number of function hosts (servers) will increase.

    Tip 6 - Choosing Right Plan.png

    The screenshot above shows when the workload (incoming requests) increases the number of servers grow instantly. Furthermore, you will only pay for the compute resources when your functions are running. Note that functions executions time out after five minutes (default) and can be set to ten minutes maximum. Also, when using a consumption plan and your functions are idle for some time and the startup of your functions might take longer (cold start).

    With the App Service Plan, you allocate resources you need, which are always available (hence no cold start). In case you need to support long-running processes with Functions than the App Service Plan is a better choice. Furthermore, with the App Service Plan, you also have support for App Service Environment, VNET/VPN connectivity, and larger VM sizes (resource dimensions).

    Azure-functions.png


    Was this article helpful?