exam questions

Exam AZ-300 All Questions

View all questions & answers for the AZ-300 exam

Exam AZ-300 topic 16 question 14 discussion

Actual exam question from Microsoft's AZ-300
Question #: 14
Topic #: 16
[All AZ-300 Questions]

You have an Azure web app named App1 that is configured to run between two and five instances. There are currently three instances of App1 running.
App1 has the following autoscale rules:
✑ Increase the instance count by one when the CPU percentage is greater or equal to 80.
✑ Decrease the instance count by one when the CPU percentage is less than or equal to 60.
You are evaluating the following CPU percentage of utilization for App1:
✑ 60%
✑ 55%
✑ 50%
✑ 45%
You need to identify which utilizations will cause App1 to scale in.

  • A. 45% only
  • B. 45% and 50% only
  • C. 50% and 55% only
  • D. 45%, 50%, and 55% only
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️
Azure Monitor autoscaling allows you to scale the number of running instances up or down, based on telemetry data (metrics). Scale-in occurs when the instances are decrease. For this rule the instances are decreased when the CPU usage is 60% or lower.
References:
https://docs.microsoft.com/en-us/azure/azure-monitor/platform/autoscale-custom-metric https://docs.microsoft.com/en-us/azure/azure-monitor/platform/autoscale-common-metrics

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
cacasodo
Highly Voted 5 years ago
I believe B is correct for the following: 45*3=135, 135/2=67.5, 67.5 < scale out threshold of 80, so Azure WILL scale in 50*3=150, 150/2=75.0, 75.0 < below scale out threshold of 80, so Azure WILL scale in 55*3=165, 165/2=82.5, 82.5 > scale out threshold of 80, so Azure WILL NOT scale in
upvoted 32 times
jivom
5 years ago
Current metric * current instance count / instance count when scaled down = current average metric, if this metric is between the minimum and maximum threshold, then we scale in, otherwise we wait until the next autoscale test to see if we can scale down (= called 'flapping')
upvoted 3 times
...
praveen97
4 years, 10 months ago
Agree with cacasodo. Answer is B.
upvoted 2 times
...
...
AnujD
Highly Voted 5 years, 1 month ago
D is right. As it considers the avergae CPU utilization post scale down. Check this: https://docs.microsoft.com/en-us/azure/azure-monitor/platform/autoscale-best-practices Assume there are 2 instances to start with. If the average CPU% across instances goes to 80, autoscale scales out adding a third instance. Now assume that over time the CPU% falls to 60. Autoscale's scale-in rule estimates the final state if it were to scale-in. For example, 60 x 3 (current instance count) = 180 / 2 (final number of instances when scaled down) = 90. So autoscale does not scale-in because it would have to scale-out again immediately. Instead, it skips scaling down. The next time autoscale checks, the CPU continues to fall to 50. It estimates again - 50 x 3 instance = 150 / 2 instances = 75, which is below the scale-out threshold of 80, so it scales in successfully to 2 instances.
upvoted 20 times
jcarlos
5 years, 1 month ago
I would go for B since D includes 55% and following the autoscale rules you've explained: 55 x 3 =165 / 2 instances = 82.5 which would lead to scale out and thus, scale in operation won't be launched
upvoted 8 times
...
SIDNEY1
5 years ago
Aren't there too many assumptions in your reasoning, AnujD? I reckon the question's missing an answer choice that says 60%.
upvoted 6 times
...
FloJoe
5 years ago
Your explanation is perfect, thank you. But solution D includes the 55% which is wrong (gives 55*3/2=82.5 which is > 80 )
upvoted 7 times
...
tartar
4 years, 9 months ago
B is ok
upvoted 2 times
...
...
RoamingDBA
Most Recent 3 years, 4 months ago
B is correct Taken current number of instances: 3, instances after scale in: 2 we have: 3x60 = 180 / 2 = 90.0% (>80%, no scale in occurs) 3x55 = 165 / 2 = 82.5% (>80%, no scale in occurs) 3x50 = 150 / 2 = 75.0% (<80%, scale in) 3x45 = 135 / 2 = 67.5% (<80%, scale in)
upvoted 1 times
...
David_986969
4 years, 9 months ago
Correct Answer is B, since when you scale down you have two instances...if you have this two with the past percentage (55% or 60% ) of usage you will get 82.5% and 90% with this two instances, that automatically will scale out again. So the percentage wich it would scale in and stays like that is 45% and 50%
upvoted 2 times
tundervirld
4 years, 9 months ago
I agree. The key in this question is we have from 2 to 5 VM, and at this moment we have 3, so in a moment of the life this will be back to two instances. So we have 3 instances in this moment and 2 instances to think in the percentage used.I'm trying to understand the formula above said by some people and I think is like it: Formula: (User percentage * Number Instances in this moment "3") / Number Instances by default "2". I did this in a Sheets. | Percentage % | WEB APP Instances 3 | Action triggered | | ------ | ------ | ------ | | 60% | 90.00% | Scale OUT + 1VM | | 55% | 82.50% | Scale OUT + 1VM | | 50% | 75.00% | Scale IN maintain | | 45% | 67.50% | Scale IN maintain | So, the answer will be 45% and 50%.
upvoted 5 times
...
...
macco455
4 years, 9 months ago
I can't be the only one looking at these explanations and thinking, in order for the app to SCALE IN, the avg CPO has to be below 60. Looking at all these calculations at no time would the avg CPU percentage be below 60 in order to scale down. (50/3)/2=75(above the 60 threshhold, (45/3)/2=67.5 also above the 60% scale in threshold thus should not scale in. So, I can kind of understand what you are trying to do by these calculations, but the questions states under 60-..not under 80 to scale in. I am probably looking at this incorrectly, but had to throw my .02 out there in case others thought the same way.
upvoted 4 times
...
fiol82
4 years, 10 months ago
the question is not clear according to me, are those readings from the same instance or simultaneous reading from separate instances?
upvoted 1 times
...
dips31089
4 years, 10 months ago
Some great discussions here. Thanks to those who mentioned calculations. Answer is 45 and 50 only.
upvoted 3 times
...
smsulai
4 years, 10 months ago
1st i did not understand the explanation though Answer is B. Then i spne sometime as it require mathematics apart from logic for everyone to understand. Instance Count --> 3 Scale Out --> 80% CPU Utilization Scale In --> Less or Equal to 60% Now the calculation takes place. Assume if all 3 servers utlization is 60% then the average is (60+60+60)/2 [3-1] (Need to reduce by 1 from total instance as part of scale down) which is 90% hence scale in is not possible. You can apply similar calculation for 55 and the answers 165/2 again scale in will not happen. Now, if we do the same for 40 and 45%, the result is lesser than scale-out thresold of 80, so it scales in successfully to 2 instances.
upvoted 3 times
...
azureexaminer
4 years, 11 months ago
https://docs.microsoft.com/en-us/azure/azure-monitor/platform/autoscale-best-practices We recommend choosing an adequate margin between the scale-out and in thresholds. As an example, consider the following better rule combination. Increase instances by 1 count when CPU% >= 80 Decrease instances by 1 count when CPU% <= 60 In this case Assume there are 2 instances to start with. If the average CPU% across instances goes to 80, autoscale scales out adding a third instance. Now assume that over time the CPU% falls to 60. Autoscale's scale-in rule estimates the final state if it were to scale-in. For example, 60 x 3 (current instance count) = 180 / 2 (final number of instances when scaled down) = 90. So autoscale does not scale-in because it would have to scale-out again immediately. Instead, it skips scaling down. The next time autoscale checks, the CPU continues to fall to 50. It estimates again - 50 x 3 instance = 150 / 2 instances = 75, which is below the scale-out threshold of 80, so it scales in successfully to 2 instances.
upvoted 1 times
...
maheshwary
4 years, 11 months ago
B (45%, 50%)
upvoted 2 times
...
Chokies
4 years, 11 months ago
Why are we computing here? I think we should consider that the numbers given are the utilization of the App itself. Because if the numbers are per instance shouldnt be the choices 4 percentange as well?
upvoted 2 times
...
pkg02
4 years, 12 months ago
Correct answer is B, Any % below (80*2)/3=53.33% will cause the scale in.
upvoted 2 times
...
MukeshKhamparia
5 years ago
Answer B - 45 and 50 - https://docs.microsoft.com/en-us/azure/azure-monitor/platform/autoscale-best-practices Assume there are 2 instances to start with. If the average CPU% across instances goes to 80, autoscale scales out adding a third instance. Now assume that over time the CPU% falls to 60. Autoscale's scale-in rule estimates the final state if it were to scale-in. For example, 60 x 3 (current instance count) = 180 / 2 (final number of instances when scaled down) = 90. So autoscale does not scale-in because it would have to scale-out again immediately. Instead, it skips scaling down. The next time autoscale checks, the CPU continues to fall to 50. It estimates again - 50 x 3 instance = 150 / 2 instances = 75, which is below the scale-out threshold of 80, so it scales in successfully to 2 instances.
upvoted 8 times
...
aperez1979
5 years ago
C is right. there are 3 instances to start.
upvoted 2 times
aperez1979
5 years ago
B i want to say.
upvoted 2 times
...
...
gbmani
5 years ago
Based on your reponse the answer should be B. 45% and 50% only because (55X3)/2 > 80.
upvoted 2 times
...
AnujD
5 years, 1 month ago
Sorry, my explanation is right but answer is B. 45 and 50% only. As when utilization is 55% then if scale in the load is to be shared by 2 instances which will bring the load to 82.5% (55*3 = 165 -> 165/2 = 82.5) per instance and immediately it would need to scale out. Hence it will not scale in at 55%.
upvoted 10 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...