AWS Certified Solutions Architect - Associate / Question #1027 of 1019

Question #1027

A company is migrating a distributed data processing application to AWS. The application handles fluctuating workloads and currently uses a master server to distribute tasks to worker nodes. The company aims to redesign the architecture for maximum scalability and fault tolerance.

Which design should a solutions architect recommend to meet these requirements?

A

Use Amazon SQS to queue tasks. Deploy worker nodes as EC2 instances in an Auto Scaling group with scheduled scaling policies.

B

Use Amazon SQS to queue tasks. Deploy worker nodes as EC2 instances in an Auto Scaling group that scales based on the SQS queue length.

C

Deploy master and worker nodes as EC2 instances in Auto Scaling groups. Use AWS CloudTrail to log tasks and scale workers based on master's CPU usage.

D

Deploy master and worker nodes as EC2 instances in Auto Scaling groups. Use Amazon Kinesis Data Streams for task distribution and scale workers based on network throughput.

Explanation

Option B is the best choice because:
1. Amazon SQS decouples task distribution, removing the need for a master server, which improves fault tolerance.
2. Auto Scaling based on SQS queue length ensures workers scale dynamically with the workload, optimizing resource usage and cost.
3. Other options are less optimal:
- A uses scheduled scaling, which cannot handle unpredictable workloads.
- C relies on CloudTrail (not designed for metrics) and scales based on master CPU, which may not reflect actual task demand.
- D uses Kinesis (overkill for basic task distribution) and scales based on network throughput, which is less direct than queue length.
Key points: Use SQS for decoupling and Auto Scaling with queue-based metrics for scalability and fault tolerance.

Answer

The correct answer is: B