Soru

Zorluk: OrtaCreate and Configure Azure Functions

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?

  1. Configure the batchSize property inside the queues section of the host.json file.Cevap
  2. Add the WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT application setting and set it to the maximum instance limit.Cevap
  3. C
    Configure the WEBSITE_SCALE_LIMIT application setting and set it to the maximum instance limit.
  4. D
    Configure the maxConcurrentCalls property under the Values section in the local.settings.json file.
  5. E
    Add a maxBatchSize parameter to the trigger binding configuration in the function.json file.

Cevap

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.

Adım Adım Çözüm

1
Identify the mechanism to limit instance scale-out for a Consumption plan function app.
The WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT application setting controls the maximum scale-out limit for dynamic hosting plans.
By default, Consumption plans can scale out to many instances, which might overwhelm downstream systems. Setting WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT limits this scale-out behavior.
2
Identify the configuration file and property for managing queue trigger concurrency on a single instance.
The queues extension in the host.json file contains the batchSize property, which controls how many messages are retrieved and processed concurrently per instance.
Queue trigger concurrency is managed globally for the function app via the host.json configuration file under the extensions/queues path.

Anahtar Kavram

Azure Functions scaling limits and queue trigger concurrency configuration.
Bu soruyu puanla