An organization is deploying an Azure Function App on a Consumption plan to process messages from an Azure Queue Storage queue. To avoid overwhelming a downstream legacy database, you must implement the following constraints:
1. Restrict the maximum scale-out of the function app instances to a specific limit.
2. Control the maximum number of messages that a single instance can process concurrently.
Which two configurations should you apply to meet these requirements?
- Configure the batchSize property inside the queues section of the host.json file.Answer
- Add the WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT application setting and set it to the maximum instance limit.Answer
- CConfigure the WEBSITE_SCALE_LIMIT application setting and set it to the maximum instance limit.
- DConfigure the maxConcurrentCalls property under the Values section in the local.settings.json file.
- EAdd a maxBatchSize parameter to the trigger binding configuration in the function.json file.
Answer
Configure the batchSize property inside the queues section of the host.json file, and add the WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT application setting set to the maximum instance limit.
To limit scaling and concurrency, you must configure two separate levels: the overall instance count and the concurrency per instance. The setting for the overall instance count on dynamic plans (Consumption/Premium) is the WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT application setting. The concurrency per instance for Queue Storage triggers is controlled by configuring the batchSize setting within the queues configuration of host.json.
Step-by-Step Solution
Key Concept
Azure Functions scaling limits and queue trigger concurrency configuration.