Soru

Zorluk: ZorCreate and Configure Azure Functions

An organization deploys an Azure Function App (V4 runtime) on a Consumption plan. The function is triggered by an Azure Storage queue and processes incoming orders by writing them to an on-premises database via a Hybrid Connection. During peak hours, rapid scale-out of the Function App causes too many concurrent database connections, exceeding the database's connection limit. You need to restrict the maximum number of concurrent function app instances to 5 to protect the database, without changing the hosting plan or modifying the function code. Which configuration change should you implement?

  1. A
    Configure the queues trigger settings in the host.json file by setting batchSize to 5.
  2. Add the application setting WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT with a value of 5 in the Azure Portal.Cevap
  3. C
    Add the application setting WEBSITE_SCALE_LIMIT with a value of 5 in the Azure Portal.
  4. D
    Migrate the Function App to a Dedicated (App Service) plan and configure autoscale rules with a maximum instance count of 5.

Cevap

Add the application setting WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT with a value of 5 in the Azure Portal.
The setting WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT limits the maximum number of instances that the scale controller can spin up for a function app on a Consumption or Premium plan. By setting this value to 5, the scaling logic is capped, preventing the function app from spawning more than 5 parallel instances and thereby limiting concurrent database connections.

Adım Adım Çözüm

1
Identify the hosting plan and constraint limitations.
The Function App runs on a Consumption plan, and the hosting plan must not be changed.
This rules out migrating to a Dedicated plan or using standard App Service autoscale rules.
2
Analyze how to control scaling at the instance level vs. the application level.
Configuring batchSize in host.json restricts concurrency per instance but doesn't prevent the scaling controller from spawning new instances under high load.
We must restrict the total number of VM instances scaling out globally, not just concurrency per VM.
3
Identify the correct App Setting for limiting scale-out on dynamic plans.
The setting WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT controls the maximum instance count allowed by the scale controller.
Applying this setting to 5 limits the total function instances to 5, preventing database connection exhaustion.

Anahtar Kavram

Azure Functions scale-out limits on dynamic hosting plans.
Tahmini Süre:1m 30s
Bu soruyu puanla