AWS Auto Scaling Group: Scheduled Scaling Activity | Exam Question

Scheduled Scaling Activity

Prev Question Next Question

Question

An application is hosted in an AWS Auto Scaling group.

The ASG has a scheduled action that adds more instances at 8:00 AM every day.

The cooldown timer of the ASG is set as 45 minutes and it takes about 30 minutes for a new instance to finish its init scripts and serve traffic.

One day, the ASG scaled up at 7:45 AM because a high CPU alarm was triggered in AWS CloudWatch.

What will happen for the scheduled scaling activity on that day?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer - C.

Options A and B are incorrect because there are some scaling actions that do not need to wait for the cooldown period to expire such as a scheduled or a manual scaling action.

Option C is CORRECT because the cooldown timer does not influence the scheduled activity.

Even if the cooldown timer is running, the scheduled action takes high priority and executes immediately.

Option D is incorrect because the active cooldown timer does not override the scheduled activity.

At 8:00 AM, the scheduled scaling takes action immediately.

Reference:

https://docs.aws.amazon.com/autoscaling/ec2/userguide/schedule_time.html, https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html.

The correct answer is D. The scheduled scaling will not start this time as it is overridden by the active cooldown timer. The scheduled scaling will continue to work the next day.

Explanation:

An AWS Auto Scaling group allows the user to ensure that a desired number of EC2 instances are running to handle the application traffic. The user can configure the ASG to automatically scale in and out based on the traffic demands of the application.

When an alarm is triggered in CloudWatch, it sends a message to the Auto Scaling group to initiate scaling. If a scaling activity is triggered manually or by an alarm, the cooldown period is reset, and any scheduled scaling activity is canceled until the cooldown period has expired.

In the given scenario, the ASG has a scheduled action that adds more instances at 8:00 AM every day, and the cooldown timer of the ASG is set as 45 minutes. However, on a particular day, the ASG scaled up at 7:45 AM because a high CPU alarm was triggered in CloudWatch.

Since the ASG cooldown timer was reset due to the scaling activity that was triggered by the CloudWatch alarm, the scheduled scaling activity that was supposed to occur at 8:00 AM will not start as it is overridden by the active cooldown timer. The cooldown period of the ASG is 45 minutes, and it takes about 30 minutes for a new instance to finish its init scripts and serve traffic, so the scheduled scaling activity would not have completed by 8:45 AM. Therefore, the scheduled scaling activity will not occur on that day, and it will continue to work the next day.

Hence, the correct answer is D. The scheduled scaling will not start this time as it is overridden by the active cooldown timer. The scheduled scaling will continue to work the next day.