AWS Certified DevOps Engineer – ProfessionalResilient Cloud SolutionsEasy
A media streaming company uses Amazon EC2 instances to transcode video files. These instances are part of an Auto Scaling group. The transcoding jobs are published to an Amazon SQS queue, and the EC2 instances pull messages from this queue. The company observes that during peak hours, the queue backlog grows rapidly, leading to increased processing latency. During off-peak hours, many instances are idle, leading to unnecessary costs. The company needs a solution that automatically scales the EC2 instances based on the number of messages in the SQS queue to optimize costs and maintain low processing latency. Which Auto Scaling policy type should be configured?
- AStep Scaling Policy
- BScheduled Scaling Policy
- CTarget Tracking Scaling Policy
- DSimple Scaling Policy
Show answer & explanationAnswer & explanation
Correct answer: C. Target Tracking Scaling Policy
A Target Tracking Scaling Policy is ideal for this scenario because it allows you to define a target value for a specific metric (like the SQS QueueLength) and then automatically adjusts the Auto Scaling group capacity to maintain that target, optimizing both cost and performance.
Why the other options are wrong
- A. Step Scaling Policies allow you to define scaling adjustments based on alarm breaches, but they are less efficient than target tracking for maintaining a specific metric level and can be more complex to configure for dynamic workloads.
- B. Scheduled Scaling Policies scale at specific times, which is not suitable for responding to dynamic, unpredictable changes in SQS queue backlog.
- D. Simple Scaling Policies scale based on a single CloudWatch alarm threshold and do not dynamically adjust to maintain a target value, which can lead to over- or under-provisioning.
Target Tracking Scaling Policy
An Auto Scaling policy that adjusts capacity to maintain a specified metric at a target value.
- Automatically adjusts capacity based on a target metric.
- Commonly used with SQS QueueLength or CPU Utilization.
- Simplifies scaling configuration.
- Proactive and reactive scaling.
Memory trick: Scale Simply, Track Targets, Step Up, Schedule Time.