Question

Difficulty: MediumCreate and Configure Azure Functions

You are deploying a V4 Azure Function App on a Consumption plan. The Function App contains an Azure Service Bus queue-triggered function that integrates with a legacy on-premises system. During periods of high traffic, the Function App scales out and opens too many concurrent connections to the legacy system, causing it to crash. You need to limit the scale-out of the Function App to a maximum of 10 instances while maintaining the Consumption plan to minimize costs. Which configuration should you apply?

  1. A
    Add an application setting named WEBSITES_MAX_INSTANCE_LIMIT with a value of 10.
  2. Add an application setting named WEBSITE_MAX_DYNAMIC_SCALE_OUT with a value of 10.Answer
  3. C
    Migrate the Function App to a Dedicated (App Service) plan and configure an autoscale rule to cap instances at 10.
  4. D
    In the host.json file, set the maxConcurrentCalls property of the Service Bus trigger to 10.

Answer

Add an application setting named WEBSITE_MAX_DYNAMIC_SCALE_OUT with a value of 10.
Adding the WEBSITE_MAX_DYNAMIC_SCALE_OUT application setting with a value of 10 enforces a maximum scale-out limit of 10 instances on the serverless Consumption plan. This prevents the app from spawning too many concurrent instances and overloading the legacy on-premises system while preserving serverless cost benefits.

Step-by-Step Solution

1
Analyze the scaling requirement and constraints.
The solution requires capping the scale-out instances to 10 while keeping the Consumption plan to minimize costs.
This rules out plan migration options.
2
Differentiate between instance concurrency limits and instance scale-out limits.
Concurrency settings in host.json restrict message processing per instance, but do not prevent the orchestrator from spinning up additional instances.
To limit the total number of VM instances, an app-level scale limit must be configured.
3
Identify the correct application setting for Consumption plan instance limits.
The WEBSITE_MAX_DYNAMIC_SCALE_OUT setting directly controls the scale-out limit on Consumption and Elastic Premium plans.
Applying this setting meets all constraints.

Key Concept

Configuring scale-out limits for Azure Functions hosted on a Consumption plan
Estimated Time:1m 30s
Rate this question