Soru

Zorluk: OrtaScale Azure App Service Web Apps

You manage a web application named LogiRoute that runs on a Standard (S2) App Service plan. The plan currently has 2 instances. You configure an autoscale scale-out rule to increase the instance count by 1 when the average CPU percentage exceeds 80%80\%. During a peak period, the average CPU utilization across the 2 instances reaches 84%84\%, triggering a scale-out event. You need to configure a scale-in rule to decrease the instance count by 1 when the load decreases, ensuring that the scale-in action does not immediately trigger another scale-out (preventing autoscale flapping). Assuming the total workload remains constant immediately after scaling, what is the maximum CPU percentage threshold you should set for the scale-in rule?

  1. A CPU percentage threshold of 50%50\% on the Standard (S2) App Service planCevap
  2. B
    A CPU percentage threshold of 60%60\% on the Standard (S2) App Service plan
  3. C
    A CPU percentage threshold of 70%70\% on the Standard (S2) App Service plan
  4. D
    A CPU percentage threshold of 50%50\% on a Basic (B1) App Service plan

Cevap

A CPU percentage threshold of 50%50\% on the Standard (S2) App Service plan
The correct option is correct because the total workload of 168%168\% is divided across 3 instances after scaling out, resulting in 56%56\% CPU load per instance. To prevent immediate scale-in (flapping), the scale-in threshold must be set below 56%56\%. A threshold of 50%50\% on a Standard (S2) plan is valid and prevents flapping.

Adım Adım Çözüm

1
Calculate the total CPU workload before scaling.
Total CPU workload is 2 instances×84%=168%2 \text{ instances} \times 84\% = 168\%.
Determining the total aggregate CPU utilization helps predict the load per instance when distributed across more instances.
2
Calculate the expected CPU utilization per instance after scaling out to 3 instances.
Expected CPU utilization per instance is 168%/3=56%168\% / 3 = 56\%.
This shows the immediate CPU level that the autoscale engine will evaluate after the scale-out event completes.
3
Determine the maximum scale-in threshold to prevent flapping.
The scale-in threshold must be strictly less than 56%56\%. Therefore, 50%50\% is the correct and safe threshold.
If the scale-in threshold is set to a value higher than 56%56\% (such as 60%60\% or 70%70\%), the autoscale engine will detect that the CPU (56%56\%) is below the threshold and immediately scale in, causing a continuous loop of scaling out and in (flapping).

Anahtar Kavram

Autoscale flapping prevention and pricing tier constraints
Bu soruyu puanla