AZ-305 Question 145
Single answerA retail company runs an e-commerce API that experiences unpredictable traffic spikes. They want to avoid managing server infrastructure or container orchestration, and they need a cost-efficient solution that scales automatically according to demand, paying only for the actual usage. Which Azure compute service best meets these requirements?
- A
Deploy the API on Azure Virtual Machines in an Availability Set with a custom auto-scaling script
- B
Containerize the application and deploy it to Azure Kubernetes Service (AKS) with the cluster autoscaler
- C
Implement the API as serverless Azure Functions using the Consumption plan
- D
Host the API on Azure App Service using the Basic pricing tier
Show answer and explanation
Correct answer: C
Explanation
Azure Functions in the Consumption plan is designed to handle bursts of requests dynamically while only billing for actual usage. This perfectly aligns with the requirement of minimizing infrastructure management and scaling seamlessly with traffic spikes. For more details, refer to Azure Functions pricing and consumption plan best practices in the official Azure documentation.
- A. Incorrect.
Option 1: Azure VMs can be configured with auto-scaling, but you still manage operating systems, patches, and scripts for scaling. This increases overhead and is not purely pay-for-usage based.
- B. Incorrect.
Option 2: AKS automates container orchestration, but you still manage the cluster’s underlying infrastructure, upgrades, and node health. It’s more flexible but not the easiest option for purely serverless scaling and minimal overhead.
- C. Correct.
Option 3: Azure Functions in the Consumption plan is serverless, automatically scales based on incoming requests, and charges only for execution time, perfectly matching the need for low management overhead and pay-per-use.
- D. Incorrect.
Option 4: Azure App Service can auto-scale to an extent, but the Basic tier requires you to pay for any running instances continuously, even when your application is idle, and it doesn't provide a purely pay-per-usage model.