Question

Difficulty: MediumCreate and Configure Azure Functions

You are designing an Azure Function App to process background jobs. The system has the following constraints:

- A single execution of the function can take up to 25 minutes to complete.
- The function must securely connect to an Azure SQL Database located inside a private Azure Virtual Network (VNet).
- The Function App must scale out dynamically to handle unpredictable spikes in traffic.
- You must avoid cold start latency when new messages arrive while minimizing costs during low-traffic periods.

Which hosting plan should you choose for the Function App?

  1. Premium planAnswer
  2. B
    Consumption plan
  3. C
    Dedicated (App Service) plan
  4. D
    Durable Functions on a Consumption plan

Answer

Premium plan
The Premium plan is the correct choice because it natively supports regional outbound Virtual Network (VNet) integration, allows function execution limits of up to 60 minutes (or unlimited), scales out dynamically in response to triggers, and maintains pre-warmed instances to avoid cold start latency.

Step-by-Step Solution

1
Analyze execution duration constraints.
The execution limit rules out the standard Consumption plan.
Azure Functions on a Consumption plan have a default execution timeout of 5 minutes and a maximum limit of 10 minutes. A 25-minute execution requires a Premium or Dedicated plan.
2
Evaluate network isolation requirements.
Confirm outbound Virtual Network integration is supported.
Securely connecting to a database inside a private VNet requires regional VNet integration, which is only supported by Premium and Dedicated hosting plans.
3
Compare scaling, cold start mitigation, and pricing models.
Choose the Premium plan to satisfy dynamic scaling and pre-warmed instance requirements.
The Dedicated plan requires custom autoscale configuration and bills continuously for idle resources. The Premium plan dynamically scales instances to match trigger load while keeping pre-warmed instances to avoid cold starts.

Key Concept

Azure Functions Hosting Plans features and constraints
Rate this question