Question

Difficulty: HardServerless and Web Application Hosting

You are designing the hosting infrastructure for a new event-driven image processing solution in Azure. The solution has the following workloads:

* API Ingestion: A lightweight endpoint that receives image upload metadata. It requires rapid auto-scaling to handle unpredictable spikes in traffic, and it must scale to zero instances during idle periods to minimize costs. It does not require virtual network (VNet) integration.
* Image Analyzer: A background processor that pulls image analysis tasks from a queue, processes the images, and writes the output to an Azure SQL Database. The processor requires VNet integration to connect securely to the database via a private endpoint, can take up to 1515 minutes to process a single complex image, and must scale to zero instances when the queue is empty to minimize costs.

Which compute configuration should you recommend to meet these requirements?

  1. A
    Host the API Ingestion on Azure Functions on a Consumption plan, and host the Image Analyzer on Azure Kubernetes Service (AKS).
  2. Host the API Ingestion on Azure Functions on a Consumption plan, and host the Image Analyzer on Azure Container Apps.Answer
  3. C
    Host both the API Ingestion and the Image Analyzer on Azure Functions on a Consumption plan.
  4. D
    Host both the API Ingestion and the Image Analyzer on Azure Kubernetes Service (AKS).

Answer

Host the API Ingestion on Azure Functions on a Consumption plan, and host the Image Analyzer on Azure Container Apps.
Hosting the API Ingestion on the Azure Functions Consumption plan provides cost-effective, rapid scaling that goes down to zero instances when idle. Hosting the Image Analyzer on Azure Container Apps allows the background task to run for the required 1515 minutes, provides outbound virtual network integration to securely access the database via a private endpoint, and supports scaling down to zero instances using event-driven autoscaling to eliminate idle costs.

Step-by-Step Solution

1
Analyze the API Ingestion hosting requirements.
The API endpoint requires rapid auto-scaling to handle traffic spikes and must scale to zero during idle periods to avoid costs. Virtual network integration is not required. Azure Functions on a Consumption plan is the most cost-effective service that satisfies these conditions.
The Consumption plan scales dynamically from zero and charges only when executions occur, with no base cost.
2
Evaluate Azure Functions options for the Image Analyzer workload.
The Image Analyzer requires outbound virtual network integration, runs for up to 1515 minutes, and must scale to zero instances. The standard Consumption plan is ruled out due to its 1010-minute execution timeout limit and lack of VNet integration. The Premium plan supports VNet integration and longer durations but requires at least one pre-warmed instance, failing the scale-to-zero requirement.
Identifying that standard Azure Functions plans violate either execution timeout limits or scale-to-zero cost constraints.
3
Select the optimal container-based compute option for the Image Analyzer.
Azure Container Apps supports custom virtual network deployments, has no strict 1010-minute execution limit, and scales to zero instances based on queue metrics (via KEDA). Azure Kubernetes Service also meets these technical requirements but introduces excessive operational overhead.
Choosing Azure Container Apps over Azure Kubernetes Service minimizes management overhead while fulfilling all functional and cost constraints.

Key Concept

Selecting the optimal Azure serverless or web hosting compute option by evaluating scaling requirements, execution timeout limits, network isolation, and operational overhead.
Rate this question