AWS Certified DevOps Engineer – ProfessionalResilient Cloud SolutionsMedium

A media company uses Amazon EC2 instances to transcode video files. These instances are part of an Auto Scaling group and process jobs from an Amazon SQS queue. The transcoding process is CPU-intensive, and new jobs are consistently added to the queue throughout the day. The company wants to ensure that the transcoding instances scale out quickly enough to keep the SQS queue backlog at a manageable level, minimizing processing delays while avoiding over-provisioning. Which Auto Scaling policy type is best suited for this scenario?

  1. ATarget tracking scaling policy based on the SQS queue's ApproximateNumberOfMessagesVisible metric.
  2. BScheduled scaling policy to increase capacity during business hours.
  3. CSimple scaling policy based on CPU utilization.
  4. DStep scaling policy based on network in/out bytes.
Show answer & explanation

Correct answer: A. Target tracking scaling policy based on the SQS queue's ApproximateNumberOfMessagesVisible metric.

Target tracking scaling is ideal for maintaining a specific metric at a target value. By tracking the SQS queue's ApproximateNumberOfMessagesVisible, the Auto Scaling group can automatically scale out instances when the queue backlog grows, and scale in when it shrinks, ensuring that messages are processed efficiently without over-provisioning, directly addressing the goal of managing queue backlog.

Why the other options are wrong

  • B. Scheduled scaling is for predictable patterns, not for dynamic, real-time adjustments based on queue backlog, which can fluctuate unpredictably.
  • C. Simple scaling is reactive and can lead to 'flapping' or slow responses. It's less precise than target tracking for maintaining a specific backlog level.
  • D. Network I/O is not a direct indicator of transcoding workload or queue backlog; CPU utilization is more relevant, but tracking the queue directly is superior here.

Target Tracking Scaling for SQS

An Auto Scaling policy that adjusts capacity to keep an Amazon SQS queue metric (like backlog) at a user-defined target value.

  • Proactive and dynamic scaling based on real-time workload.
  • Helps maintain optimal queue processing speed and minimize latency.
  • Reduces over-provisioning by scaling in when demand decreases.

Memory trick: Target the queue, track the backlog, transcode fast.

More Resilient Cloud Solutions questions