An Azure App Service plan currently hosts a single instance of a web application. You configure a scale-out rule to add one instance to the plan when the average CPU usage exceeds for minutes. You need to configure a scale-in rule to remove one instance when the traffic decreases. Assuming the workload is distributed evenly across all instances after scaling out, which of the following is the maximum CPU threshold you should set for the scale-in rule to prevent autoscale flapping?
- Cevap
- B
- C
- D
Cevap
The maximum CPU threshold for the scale-in rule should be set to to prevent autoscale flapping.
When the web app is running on a single instance and CPU usage hits , the scale-out rule triggers, increasing the instance count to two. Since the workload is distributed evenly, the CPU usage on each of the two instances will drop to approximately half of the total load: . If the scale-in threshold is set to or higher, the new CPU usage level of will immediately satisfy the scale-in condition. This triggers a scale-in back to one instance, causing the CPU usage to spike back to , triggering another scale-out, and creating an infinite loop (flapping). To prevent this, the scale-in threshold must be set below the expected post-scale-out CPU usage. A threshold of is strictly below and will prevent flapping.
Adım Adım Çözüm
Anahtar Kavram
App Service Autoscale Rule Metric Configuration and Flapping Prevention