Soru

Zorluk: OrtaServerless and Web Application Hosting

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.)

  1. Azure Container Apps to host the public API endpointCevap
  2. Azure Container Apps Jobs to run the background analytics workerCevap
  3. C
    Azure Functions on a Consumption plan to run the background analytics worker
  4. D
    Azure Kubernetes Service (AKS) to host the public API endpoint

Cevap

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.

Adım Adım Çözüm

1
Analyze the scaling and cost requirements of the public API endpoint.
The API endpoint requires scale-to-zero capabilities to minimize idle costs and must handle spiky traffic, pointing to Azure Container Apps as the optimal low-overhead hosting choice.
Azure Container Apps natively supports scaling to zero based on HTTP traffic using KEDA, avoiding the operational complexity of Azure Kubernetes Service (AKS).
2
Evaluate the execution time constraint of the background analytics worker.
The worker runs for up to 20 minutes per execution, which exceeds the maximum execution timeout of 10 minutes for Azure Functions on a Consumption plan.
Choosing Azure Functions on a Consumption plan would lead to timeout failures, making Azure Container Apps Jobs the correct choice for run-to-completion tasks that exceed standard serverless timeouts.

Anahtar Kavram

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.
Bu soruyu puanla