Question 1 · choose 1
Workers on Amazon EC2 instances in an Auto Scaling group process video jobs from an Amazon SQS queue. Each job takes about 2 minutes, and a job must not wait in the queue for more than about 10 minutes. The group scales on average CPU utilization, but CPU stays near 60% whether 50 or 5,000 jobs are waiting, so backlogs build up during peaks. Which scaling approach should the DevOps engineer use?
- AA target tracking policy on ApproximateNumberOfMessagesVisible for the queue with a target value of 100 messages
- BA scheduled scaling action that adds instances during the hours when peaks have usually happened over the past month
- CA target tracking policy on average CPU utilization with a lower target value of 30% so that the group scales out earlier
- DA target tracking policy that uses metric math for backlog per instance, with a target of about 5 messages per instance
Show the answer and why
AA target tracking policy on ApproximateNumberOfMessagesVisible for the queue with a target value of 100 messages
Incorrect
The number of messages does not change in proportion to the size of the group, so a fixed queue length target does not track how much work each instance has.
BA scheduled scaling action that adds instances during the hours when peaks have usually happened over the past month
Incorrect
A schedule reacts to past patterns, not to the actual backlog, so unexpected peaks still build up.
CA target tracking policy on average CPU utilization with a lower target value of 30% so that the group scales out earlier
Incorrect
CPU stays flat whatever the backlog is, so a lower CPU target does not relate the group's size to the waiting jobs.
DA target tracking policy that uses metric math for backlog per instance, with a target of about 5 messages per instance
Correct
Backlog per instance divides the queue length by the InService instances. A target equal to the acceptable latency divided by the time per message, here 10 / 2 = 5, keeps the wait within limits.
For queue workers, the right scaling metric is backlog per instance: queue length divided by running capacity, compared with the backlog an instance can clear within the acceptable latency. Metric math lets a target tracking policy compute it without publishing a custom metric.
AWS documentation