Pricing/hosting plans

For Azure Functions, the consumption plan and App Service Plan can both be utilized:

  • Consumption plan: In consumption plan hosting, we only pay for the time of execution of the function and not for the entire duration.
  • App Service plan: In App Service plan hosting, we need to pay for all the resources allocated under the App Service plan for the entire time the App Service plan exists:

In earlier chapters, we have utilized the consumption plan for all our functions. Go to App Services and verify the plan:

Go to Function Apps in Azure Portal and verify the App Service plan; it is the same as the consumption plan:

Let's see how to create Azure Functions in the App Service plan:

  1. Create a new Function App.
  2. In the App Service plan, click on Create New.
  3. Provide the App Service plan name, Location, and Pricing tier details.
  1. Click on OK:
  1. Click on Create to create the Function App in the App Service plan:
  1. Now, we have two Function Apps in the Azure dashboard available. One has the consumption plan while the other has the App Service plan:

In the next section, we will list out some best practices for writing Azure Functions in order to utilize serverless architecture effectively for day-to-day usage.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.205.136