AZ-300 Exam QuestionsBrowse all questions from this exam

AZ-300 Exam - Question 223


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.

Show Answer
Correct Answer: B

The autoscale rules specify that the instance count will decrease when the CPU percentage utilization is 60% or lower. To determine the scale-in, the system will evaluate if the average CPU usage remains below the scale-out threshold (80%) after scaling in. Starting with three instances, if utilization is 55%, scaling down to two instances results in an average of (55 * 3) / 2 = 82.5%, which exceeds 80%. For 50% and 45%, the averages would be (50 * 3) / 2 = 75% and (45 * 3) / 2 = 67.5%, both of which are below 80%, thus meeting the criteria for scaling in. Therefore, the utilizations that will cause App1 to scale in are 45% and 50%.

Discussion

16 comments
Sign in to comment
cacasodo
May 14, 2020

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

jivom
May 21, 2020

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')

praveen97
Jul 21, 2020

Agree with cacasodo. Answer is B.

AnujD
May 8, 2020

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.

jcarlos
May 8, 2020

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

SIDNEY1
May 12, 2020

Aren't there too many assumptions in your reasoning, AnujD? I reckon the question's missing an answer choice that says 60%.

FloJoe
May 18, 2020

Your explanation is perfect, thank you. But solution D includes the 55% which is wrong (gives 55*3/2=82.5 which is > 80 )

tartar
Sep 10, 2020

B is ok

AnujD
May 8, 2020

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%.

MukeshKhamparia
May 24, 2020

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.

macco455
Aug 14, 2020

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.

smsulai
Jul 26, 2020

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.

dips31089
Aug 7, 2020

Some great discussions here. Thanks to those who mentioned calculations. Answer is 45 and 50 only.

gbmani
May 11, 2020

Based on your reponse the answer should be B. 45% and 50% only because (55X3)/2 > 80.

aperez1979
May 14, 2020

C is right. there are 3 instances to start.

aperez1979
May 14, 2020

B i want to say.

pkg02
Jun 12, 2020

Correct answer is B, Any % below (80*2)/3=53.33% will cause the scale in.

Chokies
Jun 19, 2020

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?

maheshwary
Jun 23, 2020

B (45%, 50%)

David_986969
Aug 14, 2020

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%

tundervirld
Aug 21, 2020

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%.

azureexaminer
Jun 29, 2020

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.

fiol82
Aug 7, 2020

the question is not clear according to me, are those readings from the same instance or simultaneous reading from separate instances?

RoamingDBA
Jan 12, 2022

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)