AZ-104 Exam QuestionsBrowse all questions from this exam

AZ-104 Exam - Question 326


You have an Azure App Service app named App1 that contains two running instances.

You have an autoscale rule configured as shown in the following exhibit.

For the Instance limits scale condition setting, you set Maximum to 5.

During a 30-minute period, App1 uses 80 percent of the available memory.

What is the maximum number of instances for App1 during the 30-minute period?

Show Answer
Correct Answer: AB

The autoscale rule has a duration of 15 minutes and a 5-minute cooldown period. App1 starts with 2 instances. After 15 minutes, the memory usage is checked, and since it exceeds 70%, the instance count increases by 1, making it 3 instances. The cooldown period is 5 minutes, during which no scaling occurs. After the cooldown, which is at the 20-minute mark, there is not enough time to meet the 15-minute duration again within the remaining 10 minutes of the 30-minute period. Therefore, the maximum number of instances for App1 during the 30-minute period is 3.

Discussion

17 comments
Sign in to comment
athliOption: D
Sep 4, 2023

Start at 2 instances, after 15 min, > 70%, then +1 instance Cooling 5 mins, still >70%, then +1 instance Cooling 5 mins, still > 70%, then +1 instance Cooling 5 mins, still >70%, since max 5 instances, keep 5 instances only

Jacky_exam
Dec 19, 2023

Minute 0-15: Memory usage exceeds 70%. Autoscale rule triggered. Instance count increased by 1 (from 2 to 3). Cooldown period starts. Minute 15-20 (Cooldown Period): No further scaling can occur during the cooldown period. Minute 20-30: Memory usage continues to exceed 70%, but the cooldown is still in effect. No further scaling during this time.

Hispan
Apr 2, 2024

chatgpt: Let’s calculate the number of CPU cores based on the provided information: Initial CPU Cores: 2 Scale-Out Rule: When CPU usage exceeds 80% for 15 minutes, scale out by 1 core. Cooldown period after scaling: 5 minutes. Given that the CPU usage has been above 80% for 30 minutes, let’s break it down: First 15 minutes: CPU usage exceeds 80%, so we scale out by 1 core. Total cores after the first 15 minutes: 2 (initial) + 1 (scaled out) = 3 cores. Next 15 minutes (with cooldown): During this period, no further scaling occurs due to the cooldown. Total cores remain at 3 cores. Therefore, after 30 minutes of continuous high CPU usage, you will have 3 CPU cores.

[Removed]
Jan 5, 2024

This is correct, answer D!

2a742bc
May 3, 2024

This is correct according to this article: https://cloudbuild.co.uk/azure-virtual-machine-scale-set-duration-and-cool-down-explained/

217972f
May 25, 2024

here a reference about "look back": https://learn.microsoft.com/en-us/azure/azure-monitor/autoscale/autoscale-understanding-settings#autoscale-evaluation

altairezioOption: B
Sep 1, 2023

2 instances then after 15min : 3 instances. After 5min cooldown start counting. So correct answer : 3 instances

Batiste2023
Oct 26, 2023

No, if after the cool down period the threshold is stil met, then the next scale out operation will happpen immediately (followed by another cool down period, of course). "The cooldown period for each rule dictates how long after the previous scale action (whatever rule initiated was), the rule can be applied." Source: https://github.com/MicrosoftDocs/azure-docs/issues/17169

ki01
Dec 17, 2023

Answer D. for the scaler to kick in, it needs to be 15 minutes of average use above x % that is set. so once the load starts, it will wait 15 minutes until that rule is met, and a scale up will happen. once it scales up at the 15 minute mark, the 5 minute cooldown starts. at 20 minute mark, the scaler will LOOK BACK at the PAST 15 minutes to see if during that time the usage was still higher than x% and scale up again. then it will wait another 5 minutes, check the PAST 15 minutes again, scale up again, etc. etc. the previous performance data doesnt get thrown out after each scale, it keeps on sliding the dataset its checking forward. imagine if this was a real app and you get hit by huge traffic surge. like your company release a new product. what this would do in your method is scale up one instance every 20 minutes, so it might mean multiple hours of degraded performance while it catches up to demand, while the reality and my explanation, it would kick in after 15 minutes and then keep scaling every 5 minutes which is a much faster and reasonable solution.

binhdortmund
Feb 9, 2024

correct! I wanna go with 3 at the beginning, but after reading the MS doc and also your text, 5 is my choice

mamamamn
Feb 21, 2024

Would you please share the link? I still dont get it.

FlaShhh
Feb 9, 2024

well explained

OlehTOption: B
Jan 22, 2024

Start at 2 instances, 30 minutes: -15 minutes, scaling +1 == 3. -5 minutes cooldown makes -20 minutes in total, 10 left. We need 15 minutes more to scale +1. So we need additional 5 minutes which we down't have. ANSWER is B, 3 instances

SDiwanOption: D
Feb 7, 2024

Correct answer is D , there will be 5 instances. During every scale out, it will check if previous 15 mins have sustained usage of above 70%. After 15 mins, first scale out (+1), then 20 mins (+1), 25 mins (+1), 30 mins (+1).

vsvaidOption: D
Jan 31, 2024

After 15 mins - 2 20 mins - 3 25 mins - 4 30 mins- 5

vsvaid
Jan 31, 2024

Correction, it starts with 2 After 15 mins - 20 mins - 4 25 mins - 5 30 mins- 5 - Max limit

jga_privateOption: D
Feb 4, 2024

After cool down period new instance is created

jacksparrowtabaliOption: B
Mar 24, 2024

to start the first scale out you do not wait for anytime(cooldown or count time) - at 07:00 the metric utilization got over 70% it scales to 2 (so at 07:00 you have already 2) after the scale you get to have a (5 minutes cooldown+15 minutes count=20 minutes) - at 07:20 you check again if the metric utilization is still over 70 and in this case it endured for 30 minutes so you scale again to 3 and after it you wait for (5 cooldown+15 minutes count) - at 07:40 it will check again and it will decide. SO the number will be 3.

bobothewisemanOption: B
Mar 26, 2024

Should be 3. Let say 7am-730am (30mins) 1 instance = @ 7.15am 1st scale out 7.15am-7.20am = 5mins cool down 2nd instance @ 7.35am, will not count as the question mentioned 30min

mkhlszfOption: D
Apr 22, 2024

People seem to think the cooldown will reset the 15 minute timer to check the rule, no. The timer will only reset when the criteria (the memory threshold average) stops being met. Before this the rule will check and keep adding instances every 30 to 60 seconds depending on the service. The cooldown's job is to will delay this, not to reset the rule. Again, the rule timer will only be reset when the condition is no longer being met, meaning in this case the memory usage average goes below 70% And dont trust any AI to give you an answer, people also tend to think it can reason, it cant. At least for now it is just trowing words in a way that makes sense to a human.

23169fdOption: B
Jun 3, 2024

B is correct given that the cool down period of 5 minutes must elapse before the next evaluation, and that the remaining time after the first scale action and cool down period is insufficient to meet the 15-minute threshold again within the 30-minute total period, the maximum number of instances during the 30-minute period would be 3.

bobothewisemanOption: B
Apr 2, 2024

Should be 3. Let say 7am-730am (30mins) 1 instance = @ 7.15am 1st scale out 7.15am-7.20am = 5mins cool down 2nd instance @ 7.35am, will not count as the question mentioned 30mins

CharlesS76Option: B
May 29, 2024

https://learn.microsoft.com/en-us/azure/azure-monitor/autoscale/autoscale-understanding-settings. cooldown = The amount of time to wait after a scale operation before scaling again. The cooldown period comes into effect after a scale-in or a scale-out event. For example, if cooldown = "PT10M", autoscale doesn't attempt to scale again for another 10 minutes. The cooldown is to allow the metrics to stabilize after the addition or removal of instances.

SofiaLoreanOption: D
Jun 26, 2024

Answer should be 5 > 1 (initial) + 1 (15min) + 1 (5 min cool down) + 1 (5 min cool down) + 1 (5min cool down) Total 5

sjay2024Option: C
Jun 29, 2024

There are 2 instances to start with, with usage > 70% for (0 - 15)15mins, there will be 2+1 instances 5 min is cool off period starts here but that doesn't mean usage count stops during this period. with usage > 70% for another 15mins(15 - 30) there will be (2+1)+1 instances. So the total count after 30mins = 4 C

a6bd45eOption: C
Jul 16, 2024

After cooling of 5 mins new operator evaluation cycle starts 15 min and not another cooling of 5. So we have: Start at 2 instances, after 15 min, > 70%, then +1 instance Cooling 5 minutes then new Operator evaluation duration starts of 15 min. Next tick would be on 35 which is out of consideration. So total 3 instances after 30 minutes

a6bd45eOption: B
Jul 16, 2024

*B*.3 I chose wrong answer with correct explanation before, so to repeat correctly After first +1 tick on 15min cooldown 5 starts and we are on 3 instances. After cooldown new condition evaluation period starts that is 15 minutes Since after second 15 min we are already on minute 35, after 30 minutes we are still on 3 instances.

Jp18Option: D
Jul 19, 2024

Should be D The amount of time to wait after a scale operation before scaling again. The cooldown period comes into effect after a scale-in or a scale-out event. For example, if cooldown = "PT10M", autoscale doesn't attempt to scale again for another 10 minutes. The cooldown is to allow the metrics to stabilize after the addition or removal of instances. https://learn.microsoft.com/en-us/azure/azure-monitor/autoscale/autoscale-understanding-settings#autoscale-evaluation