Question

Difficulty: MediumServerless and Web Application Hosting

An educational technology company is designing a serverless video processing workflow for their on-demand learning platform. The workflow requires two components:

1. A background worker that extracts audio from uploaded videos and generates text transcripts. This process is CPU-heavy and takes between 15 to 30 minutes to complete per video.
2. A lightweight REST API that serves the transcripts to users. This API experiences highly sporadic traffic and must minimize cost by scaling to zero instances when idle.

Which two Azure hosting options should you recommend to meet these requirements?

  1. Azure Container Apps Jobs to host the background video processing workerAnswer
  2. Azure Functions on a Consumption plan to host the REST APIAnswer
  3. C
    Azure Functions on a Consumption plan to host the background video processing worker
  4. D
    An Azure Kubernetes Service (AKS) cluster to host the REST API

Answer

Azure Container Apps Jobs to host the background video processing worker, and Azure Functions on a Consumption plan to host the REST API.
Azure Container Apps Jobs are ideal for running background tasks that run to completion and can execute for longer durations without the 10-minute timeout limit of standard serverless functions. Azure Functions on a Consumption plan is the most cost-effective choice for a lightweight REST API with sporadic traffic because it scales down to zero instances when not in use, avoiding compute costs during idle periods.

Step-by-Step Solution

1
Analyze the requirements for the background worker.
The background worker requires CPU-heavy processing that runs for 15 to 30 minutes per video.
This exceeds the maximum execution timeout of 10 minutes for standard serverless functions hosted on Azure Functions Consumption plans, meaning we need a hosting model that supports long-running execution and containerization, such as Azure Container Apps Jobs.
2
Analyze the requirements for the REST API.
The REST API has highly sporadic traffic and must minimize cost by scaling down to zero instances when idle.
Azure Functions on a Consumption plan is the ideal serverless offering to host a lightweight API with sporadic load, as it scales down to zero dynamically to ensure you only pay when code is executing.
3
Verify service match and eliminate sub-optimal options.
Azure Container Apps Jobs handles the long-running worker, and Azure Functions on Consumption plan hosts the API.
Using Azure Functions Consumption plan for the worker fails due to timeout limits, while using an AKS cluster for the API introduces unnecessary management overhead and continuous compute costs.

Key Concept

Designing serverless host options based on execution duration, scaling behavior, and management overhead constraints.
Estimated Time:2m 0s
Rate this question