Microsoft Azure Architect Design (AZ-304) Practice Test

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

Prepare for the Microsoft Azure Architect Design (AZ-304) Exam with comprehensive quiz questions designed to enhance your understanding and confidence. Master essential Azure concepts and strategies to excel on your test day!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


What should you use to execute custom C# code in response to an event routed to Azure Event Grid, minimizing costs?

  1. Azure Logic Apps in the integrated service environment

  2. Azure Functions in the Dedicated plan

  3. Azure Logic Apps in the Consumption plan

  4. Azure Functions in the Consumption plan

The correct answer is: Azure Functions in the Consumption plan

Using Azure Functions in the Consumption plan is an efficient way to execute custom C# code in response to events routed to Azure Event Grid while also minimizing costs. The Consumption plan allows you to pay only for the compute power you consume, which means you are charged based on the number of executions and the resources used during those executions. This model is ideal for event-driven architectures where the frequency and volume of events can vary greatly. Event Grid excels at delivering events from various sources like Azure services or custom applications, and Azure Functions provides a serverless compute option to process those events. By leveraging Azure Functions, you can write your custom C# code to handle the events seamlessly without needing to manage infrastructure, which is also cost-effective since you don’t incur running costs when the function is not executing. The other options do not align as well with minimizing costs during event handling. For instance, Azure Functions in the Dedicated plan incurs a consistent cost for dedicated resources regardless of usage, making it less economical in scenarios where function calls may be sporadic. Similarly, Logic Apps, while capable of handling events, tend to introduce a higher operational cost compared to the serverless execution model of Azure Functions in the Consumption plan, particularly for custom processing tasks. The Consumption plan for Logic