Microsoft Azure Administrator (AZ104) Practice Exam

Disable ads (and more) with a membership for a one time $4.99 payment

Study for the Microsoft Azure Administrator (AZ104) Exam. Prepare with flashcards and multiple choice questions, each question has hints and explanations. Get ready for your exam!

Practice this question and more.


You are building a custom Azure function app and need to ensure it dynamically allocates resources based on execution. Which configuration should you use when creating the function app?

  1. The Windows operating system and the Consumption plan hosting plan

  2. The Windows operating system and the App Service plan hosting plan

  3. The Docker container and an App Service plan that uses the B1 pricing tier

  4. The Docker container and an App Service plan that uses the S1 pricing tier

The correct answer is: The Windows operating system and the Consumption plan hosting plan

When creating a custom Azure function app that needs to dynamically allocate resources based on execution, the Consumption plan hosting plan is the most suitable option. The Consumption plan is designed specifically for serverless applications and allows for automatic scaling depending on the incoming workload. Under this plan, Azure automatically allocates the necessary compute resources to handle the requests. This means that if there are spikes in demand, the function app can automatically scale out to handle the increased load, and when the demand decreases, it scales back down, ensuring cost efficiency since you only pay for the execution time of your functions rather than for reserved resources. In contrast, hosting plans like the App Service plan, while suitable for web apps or APIs, require users to manually configure and allocate resources, which does not allow for the same level of dynamic scaling that the Consumption plan provides. Using Docker containers within either an App Service plan would not provide the same on-demand resource allocation features that the Consumption plan offers, thus making it less suitable for scenarios requiring dynamic resource management. By selecting the Windows operating system along with the Consumption plan, you leverage both an established platform and the benefits of serverless architecture, promoting efficient resource use and cost management.