Hard1 markMultiple Choice
Domain 2.4: ReliabilityReliabilityAuto ScalingSQS

AWS SAP-C02 · Question 26 · Domain 2.4: Reliability

An architecture relies on an Amazon SQS queue to decouple a web frontend from a backend processing tier running on EC2 instances in an Auto Scaling group. The processing time per message varies significantly. The company wants to scale the backend instances based on the backlog of work, rather than CPU utilization. Which metric should be used for the Auto Scaling policy?

Answer options:

A.

The SQS ApproximateNumberOfMessagesVisible metric directly.

B.

A custom CloudWatch metric calculating the ApproximateNumberOfMessagesVisible divided by the number of InService EC2 instances.

C.

The EC2 CPUUtilization metric.

D.

The SQS NumberOfMessagesSent metric.

How to approach this question

Identify the best practice for scaling worker nodes based on a queue.

Full Answer

B.A custom CloudWatch metric calculating the ApproximateNumberOfMessagesVisible divided by the number of InService EC2 instances.✓ Correct
A custom CloudWatch metric calculating the ApproximateNumberOfMessagesVisible divided by the number of InService EC2 instances.
The best practice for scaling based on SQS is to use a custom metric representing the 'backlog per instance' (queue length divided by fleet size). This prevents over-scaling or under-scaling as the fleet size changes.

Common mistakes

Scaling on the raw queue length, which doesn't account for the current processing capacity.

Practice the full AWS Solutions Architect Professional SAP-C02 Practice Exam 7

75 questions · hints · full answers · grading

More questions from this exam