A solutions architect is designing the cloud architecture for a new application on AWS. The processing should run in parallel, adding and removing application nodes as needed based on the number of jobs to process. The processor application is stateless. The design must be loosely coupled and job items must be durably stored. Which design should the solutions architect use?
Choose an answer
Tap an option to check your answer.
Correct answer: Create an Amazon SQS queue to hold the jobs that need to be processed. Create an Amazon Machine Image (AMI) that includes the processor application. Create a launch template that uses the AMI. Create an Auto Scaling group using the launch template. Set the Auto Scaling group scaling policy to add and remove nodes based on the number of items in the SQS queue..
Why this is the answer
The correct solution uses Amazon SQS for durable, loosely coupled job storage and an Auto Scaling group with a scaling policy based on the SQS queue length. This ensures parallel processing and dynamically adjusts resources (EC2 instances running the processor application) as needed. SQS is ideal for decoupling and durable storage of job items. Scaling based on queue length directly addresses the requirement to add/remove nodes based on the number of jobs.
Incorrect options:
Using Amazon SNS for job storage is incorrect because SNS is a publish/subscribe service, not designed for durable message queuing or worker-based processing.
Scaling based on CPU usage or network usage is less effective for a job processing system where the number of pending jobs is the primary driver for scaling. A high CPU or network usage might indicate a bottleneck, but not necessarily the number of jobs waiting to be processed.