Azure functions on App service

Chand, Anupam SBOBNG-ITA/RX 466 Reputation points
2021-02-02T05:28:04.857+00:00

Hi,

This question is related to functions apps hosted on an app service plan.
We intend to have multiple function apps and multiple functions within each. I'm aware that we can have multiple function apps hosted on the same app service plan. However, will each function app require its own instance or can all the function apps run on the single instance of the app service plan (assuming of course that the resources are enough)?

We are trying to decide whether to host our function apps on the premium plan or the app service plan.

Thanks

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,936 questions
0 comments No comments
{count} votes

Accepted answer
  1. JayaC-MSFT 5,606 Reputation points
    2021-02-02T07:02:17.34+00:00

    Hello @Chand, Anupam SBOBNG-ITA/RX , you can host the functions on either of these service plans. However I am sharing some details including compute resources, pricing etc. for your reference:

    62807-image.png

    Refer to this.

    Premium Plan:

    Azure Functions Premium plan in preview, our newest Functions hosting model as a solution to the cold start of Consumption Plan! This plan enables a suite of long requested scaling and connectivity options without compromising on event-based scale.
    Azure Functions Premium plan provides customers the same features and scaling mechanism used on the Consumption plan (based on number of events) with enhanced performance and VNET access. Azure Functions Premium Functions plan is billed on a per second basis based on the number of vCPU-s and GB-s your premium functions consume.
    • With the Premium plan you can use pre-warmed instances to run your app with no delay after being idle, you can run on more powerful instances, and you can connect to VNETs, all while automatically scaling in response to load.
    • Multiple function apps can be deployed to the same Premium plan, and the plan allows you to configure compute instance size, base plan size, and maximum plan size.

    62830-image.png

    In the azure function premium plan we’ll always have one pre-warmed instance to avoid the cold start issue. So in premium plan we will be paying extra only for the pre-warmed instance. Rest of the pricing remains same as the consumption plan.

    62861-image.png

    Relevant links to understand Premium plan better : https://azure.microsoft.com/en-us/blog/announcing-the-azure-functions-premium-plan-for-enterprise-serverless-workloads/
    https://learn.microsoft.com/en-us/azure/azure-functions/functions-premium-plan

    • We can create premium plan after choosing app service plan and then ‘New App Service Plan’ --> ‘Pricing Tier’ --> ‘Production’ --> choose your plan

    62770-image.png

    App Service Plan:

    In this plan, you select the configuration of a VM to be provisioned. It’s the same plan that’s used for other PaaS offerings, like Azure Web Apps. The number of cores and amount of RAM is static within the configuration. Points to remember in case of app service plan :
    • With the App Service Plan, a dedicated VM is provisioned, meaning you are charged for those resources even if they aren’t being fully used.
    • Scaling beyond the bounds of the VM is not handled by the Functions App runtime and, instead, must be configured manually.
    • The memory use of a Function within an App Service Plan is limited to the configuration of the VM. In other words, your limit can be much higher.
    • There’s no execution time limit. Because the CPU cores are provisioned for your VM, your Function may run for as long as it needs to.
    • Functions can be "always on." In App Service Plans, you may configure a Function to be always on, thereby eliminating the idle time, shut off, and accompanying performance penalty that may happen in the Consumption Plan.
    Using this link you can calculate the charges depending on your requirement :

    https://azure.microsoft.com/en-us/pricing/calculator/#app-servicef6840cd6-9508-4ada-8b94-6124b6eb8a19

    Pricing Details:

    • here is the link to understand the pricing of azure function better :

    https://azure.microsoft.com/en-in/pricing/details/functions/
    https://buildazure.com/2016/10/11/how-azure-functions-pricing-works/

    To calculate default hosting plan charges you may use this link : https://azure.microsoft.com/en-us/pricing/calculator/#functions29773486-4df0-4f45-99d6-2e2f6041f066

    Let me know if this helps.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.