exam questions

Exam AZ-303 All Questions

View all questions & answers for the AZ-303 exam

Exam AZ-303 topic 5 question 107 discussion

Actual exam question from Microsoft's AZ-303
Question #: 107
Topic #: 5
[All AZ-303 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
seaman29
Highly Voted 4 years, 6 months ago
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) Answer is B: B. 45% and 50% only
upvoted 121 times
rdemontis
4 years ago
Correct answer!! Thanks for the clear explanation!
upvoted 2 times
...
Blimpy
4 years, 6 months ago
No, it wont scale in because of a Scale Out Rule not being met. It will only scale in on a Scale in rule.. there is no correct answer given. If there was "only" a 55% answer option, that would be the closest as you would have reached your min value of 2 (and no more scale in can occur). But even truly this would be wrong as the first scale in would have occurred at 60% CPU (from 3 down to 2, and no more can occur) Perhaps there is a "None of the Above" option missing from the Answer Section
upvoted 2 times
Blimpy
4 years, 6 months ago
Update: Geez, I've tried to read the question differently and maybe the question is directed at a hypothetical scenario as it states You are "evaluating" the CPU utilizations. If it is a mental test of what could trigger the Scale in Rule, then an average CPU load of 45, 50 and 55 would trigger it (based on the time interval in the rule). 60% average will also trigger it but it is not an answer option. We can also assume they are not bothered about min values at this stage, they just want to know what 'average' utilization could trigger the rule. They dont use the word average, but that is the nature of autoscale rules.
upvoted 1 times
...
...
Uglydotcom
4 years, 4 months ago
Correct, check here! https://docs.microsoft.com/en-us/azure/azure-monitor/autoscale/autoscale-best-practices#choose-the-thresholds-carefully-for-all-metric-types
upvoted 4 times
...
Azurefox79
3 years, 8 months ago
Did not read the question, were talking scale in, not out
upvoted 1 times
...
...
yassali
Highly Voted 4 years, 6 months ago
B is the correct answer as per below https://docs.microsoft.com/en-us/azure/azure-monitor/platform/autoscale-best-practices
upvoted 26 times
s1fd01
4 years, 5 months ago
Great link with explanation. Thanks! Guys/Gals - read the Choose the thresholds carefully for all metric types on that link. That should lead you to Answer B
upvoted 4 times
...
paulot
4 years, 3 months ago
Yeah, right here, the same scenario: https://docs.microsoft.com/en-us/azure/azure-monitor/autoscale/autoscale-best-practices#choose-the-thresholds-carefully-for-all-metric-types
upvoted 4 times
...
...
esther823
Most Recent 3 years, 4 months ago
Selected Answer: B
Answer is B
upvoted 1 times
...
AD3
3 years, 5 months ago
B is correct for sure. see what Azure doc says. Before scaling down, autoscale tries to estimate what the final state will be if it scaled in. For example, 575 x 3 (current instance count) = 1,725 / 2 (final number of instances when scaled down) = 862.5 threads. This means autoscale would have to immediately scale out again even after it scaled in, if the average thread count remains the same or even falls only a small amount. However, if it scaled up again, the whole process would repeat, leading to an infinite loop. To avoid this situation (termed "flapping"), autoscale does not scale down at all. Instead, it skips and reevaluates the condition again the next time the service's job executes. The flapping state can confuse many people because autoscale wouldn't appear to work when the average thread count was 575. Read carefully: https://docs.microsoft.com/en-us/azure/azure-monitor/autoscale/autoscale-best-practices
upvoted 2 times
...
ERROR505
3 years, 5 months ago
Selected Answer: D
Correct if you know how to count.
upvoted 1 times
ERROR505
3 years, 5 months ago
Sorry I wanted to say B
upvoted 1 times
...
...
JBS
3 years, 7 months ago
100% B is the right answer
upvoted 1 times
...
syu31svc
3 years, 11 months ago
seaman29 has said it best B is the answer
upvoted 1 times
...
bharadhwaj
4 years ago
brilliant seaman29
upvoted 1 times
...
aut0pil0t
4 years ago
B is correct Explained in https://docs.microsoft.com/en-us/azure/azure-monitor/autoscale/autoscale-best-practices#choose-the-thresholds-carefully-for-all-metric-types
upvoted 1 times
...
Tripp_F
4 years ago
The answer is B: 45% and 50% only. Autoscale will not scale in for 60% or 55% because that would immediately put resources in a "scale out" state. This infinite loop behavior is referred to as "flapping." Please see link below for Microsoft's explanation. Quoting seaman29 for the math: 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) https://docs.microsoft.com/en-us/azure/azure-monitor/autoscale/autoscale-best-practices#:~:text=To%20avoid%20this%20situation%20(termed,time%20the%20service's%20job%20executes.
upvoted 4 times
...
SnakePlissken
4 years, 2 months ago
B. 45% and 50% only. Before scaling in, autoscale tries to estimate what the final state will be. When the CPU is utilized for 55% with 3 instances, scaling in would immediately cause scaling out: 55% x 3 = 165% => 165% / 2 = 82.5%. If it scaled out again, the whole process would repeat, leading to an infinite loop. To avoid this situation (termed "flapping"), autoscale does not scale in at all. Instead, it skips and reevaluates the condition again the next time the service's job executes. https://docs.microsoft.com/en-us/azure/azure-monitor/autoscale/autoscale-best-practices
upvoted 3 times
...
demonite
4 years, 3 months ago
Answer is D, even 60% will trigger it but not present so.
upvoted 2 times
pentium75
3 years, 12 months ago
No. "Before scaling down, autoscale tries to estimate what the final state will be if it scaled in. For example, 575 x 3 (current instance count) = 1,725 / 2 (final number of instances when scaled down) = 862.5 threads. This means autoscale would have to immediately scale out again even after it scaled in, if the average thread count remains the same or even falls only a small amount. However, if it scaled up again, the whole process would repeat, leading to an infinite loop. To avoid this situation (termed "flapping"), autoscale does not scale down at all. Instead, it skips and reevaluates the condition again the next time the service's job executes. The flapping state can confuse many people because autoscale wouldn't appear to work when the average thread count was 575."
upvoted 3 times
...
...
DNeo
4 years, 4 months ago
The question is framed with a trick and the answer here is correct. all the utilizations given in options can cause Scale in. so Answer is D.
upvoted 3 times
...
StarkStrange
4 years, 5 months ago
Great explaination on this page. https://docs.microsoft.com/en-us/azure/azure-monitor/autoscale/autoscale-best-practices Before scale-in happens, the "after State" is calculated first.. Like if at 3 instances with 60% usage are there, scale-in is triggered, but does not happen. Because, 60*3 = 180 and if 3-1 =2 happens, the resulting usage will be 180/2 = 90% which will result in scale-out immediately, aka Flapping.. therefore 45 and 50% are the only 2 where scale-in will happen.
upvoted 6 times
AK2020
4 years, 4 months ago
Answer is B
upvoted 1 times
...
paulxyz90
4 years, 4 months ago
This is interesting . It says scale out by 1 if >80% and scale in by 1 if <60%. So if load is high scale out, if load is low scale in. Fine. If we go with the assumption of the 'after state' then 50*3 = 150 and 150/2 = 75. That would not trigger anything to scale in. Similarly 45*3 = 135 and 135/2 = 67.5. That also doesn't trigger anything. You would have to go to 40 to trigger a scale in. That means 40*3 = 120 and 120/2 = 60. Finally it is less than or equal 60. That is not an option in the answers. So you have to change your interpretation. You have to read it as post 'after state' calculation - what numbers would cause a scale in. That would be 45/50/55. But it says 'only' and also 60 is one of the tests and not included in that list - so D is also not correct. If you have to choose the second interpretation and go with the most right answer - it has to be D.
upvoted 1 times
paulxyz90
4 years, 4 months ago
Oh so now that I'm thinking about this more I understand. You have to interpret the question as the 'after state' but think about the scale out / flapping specifically. So in that case technically 45, 50, 55 would cause scale in - BUT - 55*3 = 165 and 165/2 = 85 so that would cause a scale out again since it is more than 80%. The 50 would results in 150/2 = 75 and the 45 would results in 67.5 which would both not cause a scale out / flapping to happen. Makes sense now. OK I take it back - the answer is B :)
upvoted 1 times
paulxyz90
4 years, 4 months ago
165/2 = 82.5 (correction above) - but conclusion is the same - it's more than 80
upvoted 1 times
...
...
...
...
CertBeginner
4 years, 6 months ago
Correct Answer: B As it considers the average 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 7 times
dzein
4 years, 6 months ago
correct and clear, thx
upvoted 1 times
...
HNatalie
4 years, 5 months ago
Is it scale in only when “ Decrease the instance count by one when the CPU percentage is less than or equal to 60.”? not < 80?
upvoted 1 times
...
...
AmitRoy
4 years, 6 months ago
Looks like B. Autoscale does not scale-in if it has to scale-out again immediately because of scale-out rule. Instead, it skips scaling down.
upvoted 4 times
...
MichaelCWWong
4 years, 7 months ago
None of the provided answers is correct. As the configured scale-in rule is "CPU time less or equal to 60%", plus the app is configured to run between 2 to 5 instance with 3 as initial instance. Therefore, scale-in will occur once at 60% to 2 instance and no more scale-in will occur as it hits minimum instance #.
upvoted 13 times
Blimpy
4 years, 6 months ago
I agree with you.. If there was "only" a 55% answer option, that would be the closest as you would have reached your min value of 2 (and no more scale in can occur). But even truly this would be wrong as the first scale in would have occurred at 60% CPU (from 3 down to 2, and no more can occur) Perhaps there is a "None of the Above" option missing from the Answer Section
upvoted 1 times
Blimpy
4 years, 6 months ago
Geez, I've tried to read the question differently and maybe the question is directed at a hypothetical scenario as it states You are "evaluating" the CPU utilizations. If it is a mental test of what could trigger the Scale in Rule, then an average CPU load of 45, 50 and 55 would trigger it (based on the time interval in the rule). 60% average will also trigger it but it is not an answer option. We can also assume they are not bothered about min values at this stage, they just want to know what 'average' utilization could trigger the rule. They dont use the word average, but that is the nature of autoscale rules.
upvoted 1 times
...
...
BhargaV
4 years, 6 months ago
Took time to understand the answers but given answer is correct. It's not necessary that CPU utlization will go down from 60>55?50>45. It says what if CPU Utilization is 60, Scale In occurs? CPU Utilization is 55, Scale In occurs? https://www.examtopics.com/discussions/microsoft/view/19975-exam-az-300-topic-16-question-14-discussion/
upvoted 3 times
BhargaV
4 years, 6 months ago
Correct Answer B
upvoted 4 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 ...