Soru

Zorluk: OrtaCreate and Configure Azure Functions

You are designing a V4 Azure Function App that processes messages from an Azure Queue Storage queue. The Function App is hosted on a Consumption plan.

You have the following requirements:
1. Prevent a single Function App instance from processing more than 88 messages concurrently to avoid memory exhaustion.
2. Prevent the Function App from scaling out to more than 1010 instances to avoid overloading a downstream database.

Which of the following configuration actions must you perform? (Select TWO)

  1. In the host.json file, configure the batchSize property to 8 under the extensions/queues section.Cevap
  2. Add an Application Setting named WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT and set its value to 10.Cevap
  3. C
    Add a property named functionAppScaleLimit with a value of 10 to the host.json file.
  4. D
    In the trigger configuration of the function, set the batchSize parameter of the Queue trigger binding to 8.

Cevap

In the host.json file, configure the batchSize property to 8 under the extensions/queues section, and add an Application Setting named WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT and set its value to 10.
To limit the concurrent message processing on a per-instance basis, you must modify the global host configuration. In Azure Functions, the batchSize property within the extensions/queues block of the host.json file defines how many messages an instance can pull and process concurrently. To limit the overall scale-out of the Function App, you configure the WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT application setting, which tells the scale controller to cap instance allocation at the specified limit.

Adım Adım Çözüm

1
Configure the per-instance concurrency limit.
Modify host.json to include "queues": { "batchSize": 8 } under the extensions section.
This limits the maximum number of queue messages that a single instance of the Functions runtime will retrieve and process concurrently.
2
Configure the scale-out limit for the Function App.
Add the WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT setting with a value of 10 in the Azure Function App application settings.
This restricts the scale controller from provisioning more than 10 instances under high load conditions.

Anahtar Kavram

Azure Functions Concurrency and Scale-out Configuration
Bu soruyu puanla