Microsoft Certified: Azure Developer Associate (AZ-204)Connect to and consume Azure services and third-party servicesEasy
A company needs to implement a serverless solution that automatically resizes images uploaded to Azure Blob Storage. The resizing process can take varying amounts of time, and the solution must be cost-effective, scaling down to zero when idle. Which Azure service combination provides the most efficient and scalable solution?
- AAzure VM with a custom application polling Blob Storage.
- BAzure Logic App with a Blob trigger and an Azure Function for resizing.
- CAzure Function App with a Blob trigger running on a Premium plan.
- DAzure Function App with a Blob trigger running on a Consumption plan.
Show answer & explanationAnswer & explanation
Correct answer: D. Azure Function App with a Blob trigger running on a Consumption plan.
An Azure Function App with a Blob trigger on a Consumption plan is ideal. The Blob trigger automatically detects new image uploads, and the Consumption plan ensures that you only pay for compute resources when the function is actively running, scaling down to zero when there are no images to process, making it highly cost-effective and scalable.
Why the other options are wrong
- A. An Azure VM is not serverless, incurs continuous costs, and requires manual management and polling logic, making it inefficient for this scenario.
- B. While feasible, Logic Apps introduce an additional layer of orchestration and cost compared to a direct Function Blob trigger for this specific task.
- C. A Premium plan offers enhanced performance and VNet integration but is more expensive than a Consumption plan and not strictly necessary for cost-effective, burstable image resizing.
Azure Function Consumption Plan
A hosting plan for Azure Functions where compute resources are dynamically allocated and deallocated based on demand. You pay only for the time your code is running and the memory it consumes.
- Scales automatically, including to zero.
- Pay-per-execution billing model.
- Ideal for event-driven, intermittent workloads.
Memory trick: Consumption plan is like a smart meter for your code, only charging when the lights are on.