Create a Dynamic Azure Function App for Event Grid | AZ-101 Exam Answer

Create a Dynamic Azure Function App for Event Grid

Question

You are building a custom Azure function app to connect to Azure Event Grid.

You need to ensure that resources are allocated dynamically to the function app. Billing must be based on the executions of the app.

What should you configure when you create the function app?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

A

Azure Functions runs in two different modes: Consumption plan and Azure App Service plan. The Consumption plan automatically allocates compute power when your code is running. Your app is scaled out when needed to handle load, and scaled down when code is not running.

Incorrect Answers:

B: When you run in an App Service plan, you must manage the scaling of your function app.

https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-azure-function

The correct answer is A, the Windows operating system and the Consumption plan hosting plan.

Azure Functions is a serverless compute service that enables you to run event-triggered code without having to explicitly provision or manage infrastructure. When you create an Azure Function app, you need to choose a hosting plan that determines how resources are allocated to the app and how you are billed for its usage.

There are two types of hosting plans for Azure Functions: the Consumption plan and the App Service plan.

The Consumption plan is a serverless hosting option that automatically allocates compute resources for your function app based on demand. You pay only for the time your functions run and the memory and other resources they consume. With the Consumption plan, you don't have to worry about capacity planning or managing servers. Azure Functions automatically scales out or scales in instances of your app based on the number of incoming requests.

On the other hand, the App Service plan is a hosting option that allows you to run your function app on a dedicated set of compute resources that you provision and manage. With the App Service plan, you can choose the size and number of virtual machines (VMs) that run your function app. You pay for the VMs whether your functions are running or not.

In this case, you need to ensure that resources are allocated dynamically to the function app, and that billing is based on the executions of the app. This suggests that you should use the Consumption plan, which automatically scales the resources allocated to your app based on demand and bills you only for what you use.

Additionally, the question asks you to build a custom Azure function app to connect to Azure Event Grid, so you don't need to configure a Docker container.

Therefore, the correct answer is A, the Windows operating system and the Consumption plan hosting plan.