You are conducting an architectural review for a smart city traffic monitoring system. The system requires two primary workloads to be hosted in Azure:
1. A public API endpoint for transit queries that experiences severe traffic spikes during rush hours and long periods of inactivity overnight. To optimize cost, it must scale to zero instances when idle.
2. A background analytics worker that processes traffic camera footage. Each execution is triggered by a file upload, runs a custom computer vision model, and takes up to 20 minutes to complete.
To meet these requirements with the lowest operational overhead and cost, which two components should you include in your design? (Select TWO.)
- Azure Container Apps to host the public API endpointAnswer
- Azure Container Apps Jobs to run the background analytics workerAnswer
- CAzure Functions on a Consumption plan to run the background analytics worker
- DAzure Kubernetes Service (AKS) to host the public API endpoint
Answer
Azure Container Apps to host the public API endpoint and Azure Container Apps Jobs to run the background analytics worker.
Azure Container Apps is the optimal solution for the public API endpoint because it supports automatic scaling down to zero instances when there is no traffic, effectively reducing costs during inactive hours. Azure Container Apps Jobs is the correct solution for the background analytics worker because it provides containerized execution for run-to-completion, event-triggered tasks without being restricted by the 10-minute execution limit that applies to standard Azure Functions Consumption plans.
Step-by-Step Solution
Key Concept
Designing serverless hosting solutions requires balancing execution time limits (such as the 10-minute timeout of Azure Functions Consumption plans) against scaling requirements (such as scale-to-zero capabilities) and operational complexity.