Question

Difficulty: Very hardCreate and Configure Azure Functions

You are designing an Azure Function app (Runtime version 4.x) that processes sensitive financial transactions from an Azure Service Bus queue. The function requires outbound connectivity to an Azure SQL Database secured behind a private endpoint in a virtual network (VNet). The transaction processing logic is resource-intensive, requiring up to 25 minutes to complete per batch, and must avoid any cold start latency to meet strict Service Level Agreements (SLAs). Additionally, you must ensure that the function app does not scale beyond 20 concurrent VM instances to prevent connection pool exhaustion on the database. Which hosting plan and scale configuration should you implement to meet these requirements?

  1. Deploy the function app to an Elastic Premium plan. Configure outbound virtual network integration, set the function app timeout (functionTimeout in host.json) to 30 minutes, and set the functionAppScaleLimit property of the function app to 20.Answer
  2. B
    Deploy the function app to a Consumption plan. Configure outbound virtual network integration, set the function app timeout (functionTimeout in host.json) to 30 minutes, and set the WEBSITE_MAX_DYNAMIC_SCALE_OUT application setting to 20.
  3. C
    Deploy the function app to a Dedicated (App Service) plan with Always On enabled. Configure outbound virtual network integration, and configure the maxConcurrentCalls setting to 20 in the host.json configuration file.
  4. D
    Deploy the function app to an Elastic Premium plan. Configure outbound virtual network integration, set the function app timeout (functionTimeout in host.json) to 30 minutes, and set the WEBSITE_MAX_DYNAMIC_SCALE_OUT application setting to 20.

Answer

Deploy the function app to an Elastic Premium plan, configure outbound virtual network integration, set the timeout to 30 minutes, and set the functionAppScaleLimit property of the function app resource to 20.
The correct option correctly pairs the Elastic Premium plan—which provides outbound VNet integration, pre-warmed instances to avoid cold starts, and a configurable timeout limit beyond 10 minutes—with the functionAppScaleLimit property, which is the platform-supported way to cap instance scale-out on Premium plans.

Step-by-Step Solution

1
Evaluate hosting plans based on execution duration.
The Consumption plan has a hard limit of 10 minutes for execution duration, which rules it out since the batch process takes 25 minutes. Both the Elastic Premium plan and Dedicated (App Service) plan support execution limits that can accommodate 25 minutes.
Choosing a plan that supports long-running executions prevents premature function timeouts.
2
Evaluate hosting plans based on network integration and cold start requirements.
The Elastic Premium plan and Dedicated plan both support regional outbound virtual network integration to reach the secured database. They also both support cold-start mitigation (via pre-warmed instances and Always On respectively), but the Premium plan offers serverless dynamic scaling that scales to zero when idle.
VNet integration is necessary for connecting to private endpoints, and pre-warmed instances ensure the first execution starts immediately.
3
Determine the correct scaling limit configuration method.
To restrict the number of instances for an Elastic Premium plan, the functionAppScaleLimit property on the function app resource must be set to 20. The WEBSITE_MAX_DYNAMIC_SCALE_OUT app setting only works on the Consumption plan. The maxConcurrentCalls setting in host.json only restricts per-instance concurrency, not VM scaling.
Configuring the correct scale limit property ensures that the function scaling behavior matches the platform configuration guidelines for the selected hosting plan.

Key Concept

Azure Functions hosting plans, execution timeouts, VNet integration, and scale-out configurations.
Rate this question