SOA-C03 · Question #20
SOA-C03 Question #20: Real Exam Question with Answer & Explanation
The correct answer is B: Define and use Amazon CloudWatch metric math to calculate the SQS queue backlog for each. To reduce SQS message backlog during peak traffic, the engineer needs a scaling policy that responds directly to queue depth per instance, which requires CloudWatch metric math to calculate the backlog per instance ratio.
Question
A company uses an Amazon Simple Queue Service (Amazon SQS) queue and Amazon EC2 instances in an Auto Scaling group with target tracking for a web application. The company collects the ASGAverageNetworkIn metric but notices that instances do not scale fast enough during peak traffic. There are a large number of SQS messages accumulating in the queue. A CloudOps engineer must reduce the number of SQS messages during peak periods. Which solution will meet this requirement?
Options
- ADefine and use a new custom Amazon CloudWatch metric based on the SQS
- BDefine and use Amazon CloudWatch metric math to calculate the SQS queue backlog for each
- CDefine and use step scaling by specifying a ChangeInCapacity value for the EC2 instances.
- DDefine and use simple scaling by specifying a ChangeInCapacity value for the EC2 instances.
Explanation
To reduce SQS message backlog during peak traffic, the engineer needs a scaling policy that responds directly to queue depth per instance, which requires CloudWatch metric math to calculate the backlog per instance ratio.
Common mistakes.
- A. A custom CloudWatch metric based on SQS alone (without per-instance normalization via metric math) does not account for the current number of running instances, making it an inaccurate signal for target tracking scaling decisions.
- C. Step scaling with ChangeInCapacity adds a fixed number of instances at defined thresholds, which is less precise and reactive than a target tracking policy driven by the actual per-instance queue backlog metric.
- D. Simple scaling requires a cooldown period after each scaling action before evaluating further alarms, making it too slow to respond to rapidly accumulating SQS messages during peak traffic compared to target tracking with metric math.
Concept tested. SQS-based autoscaling using CloudWatch metric math
Reference. https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-using-sqs-queue.html
Community Discussion
No community discussion yet for this question.