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?
- 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
- BDeploy 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.
- CDeploy 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.
- DDeploy 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
Key Concept
Azure Functions hosting plans, execution timeouts, VNet integration, and scale-out configurations.