Q8 — AWS SAA-C03 Ch.16

Question 8 of 100 | ← Chapter 16

Q1208. A company has an application that runs on five Amazon EC2 instances. The instances run behind an Application Load Balancer (ALB). The application processes messages from an Amazon Simple Queue Service (Amazon SQS) queue.During the upcoming discount season, the company is expecting an increase in the average number of users each day.The number of users will double during peak times and will result in more messages in the SQS queue.What should a solutions architect do to handle the increase in user traffic MOST cost-effectively?

Correct Answer: D. Create an EC2 Auto Scaling group.Add the existing EC2 instances to the Auto Scaling group.Update the ALB's target to be the Auto Scaling group. Configure the Auto Scaling group to scale in or out based on the number of messages in the SQS queue.

Explanation

To handle the increase in user traffic during the upcoming discount season most cost-effectively, the solutions architect should take the following approach:D. Create an EC2 Auto Scaling group. Add the existing EC2 instances to the Auto Scaling group. Update the ALB's target to be the Auto Scaling group. Configure the Auto Scaling group to scale in or out based on the number of messages in the SQS queue.Analysis:EC2 Auto Scaling Group:Scalability: By creating an Auto Scaling group, the application can automatically adjust the number of EC2 instances based on demand. This ensures that the application can handle the increased traffic during peak times without manual intervention.Cost-Effectiveness: Auto Scaling allows the company to only pay for the compute resources that are actually used. During off-peak times, the number of instances can be scaled down, reducing costs.Adding Existing EC2 Instances to the Auto Scaling Group:Utilization of Existing Resources: By adding the existing EC2 instances to the Auto Scaling group, the company can leverage its existing infrastructure and avoid the need to purchase additional instances upfront.Updating the ALB's Target to be the Auto Scaling Group:Load Balancing: By updating the Application Load Balancer (ALB) to target the Auto Scaling group, the ALB can distribute incoming traffic evenly across all active instances in the group, ensuring high availability and improved performance.Scaling Based on the Number of Messages in the SQS Queue:Direct Scaling Trigger: Configuring the Auto Scaling group to scale in or out based on the number of messages in the SQS queue ensures that the number of EC2 instances is directly proportional to the workload. This is more efficient than scaling based on CPU utilization, as it directly addresses the root cause of the increased traffic (the number of messages in the queue).Why Other Options Are Not Suitable:A. Scaling Based on Average CPU Utilization:Indirect Scaling Trigger: Scaling based on CPU utilization may not be the most effective approach in this scenario, as the increase in traffic is driven by the number of messages in the SQS queue, not necessarily the CPU load on the instances. Scaling based on CPU utilization could lead to under-provisioning or over- provisioning of resources.B. Doubling the Capacity of the SQS Queue and Adding More EC2 Instances:Manual Intervention: This approach requires manual intervention to add more instances, which is not as efficient or cost-effective as using Auto Scaling. Additionally, it does not provide a dynamic way to adjust the number of instances based on the actual workload.C. Doubling the Capacity of the SQS Queue and Doubling the Memory of the EC2 Instances:Inefficient Resource Utilization: Doubling the memory of the EC2 instances may not be necessary or cost- effective, especially if the bottleneck is not memory-related. Additionally, this approach does not provide a scalable solution that can automatically adjust to changes in workload.