SAA-C03 Question 265
Single answerA company hosts a web application on Amazon EC2 instances behind an Application Load Balancer (ALB). The traffic to the application is highly variable, with spikes during marketing campaigns. The company wants to optimize costs while ensuring the application can handle sudden spikes in traffic. Which solution best meets these requirements?
- A
Configure Amazon EC2 Auto Scaling with a target tracking scaling policy to adjust the number of instances based on average CPU utilization.
- B
Use AWS Auto Scaling to scale the ALB itself based on incoming traffic patterns.
- C
Manually add or remove EC2 instances based on expected traffic spikes during marketing campaigns.
- D
Use a fixed number of EC2 instances with Reserved Instances to handle the peak traffic.
Show answer and explanation
Correct answer: A
Explanation
Using Amazon EC2 Auto Scaling with a target tracking scaling policy is the best solution for applications with highly variable traffic. It ensures the application scales dynamically to handle spikes in demand while minimizing costs during periods of low traffic. This approach eliminates the need for manual intervention and ensures resources are used efficiently.
- A. Correct.
This is correct. Amazon EC2 Auto Scaling with a target tracking scaling policy allows the number of EC2 instances to dynamically adjust based on demand (e.g., CPU utilization). This ensures the application can handle spikes in traffic while avoiding unnecessary costs during low traffic periods.
- B. Incorrect.
This is incorrect. While AWS Auto Scaling can manage scaling for other AWS services, the Application Load Balancer itself does not scale in the same way as EC2 instances. The ALB automatically adjusts its capacity to handle traffic without requiring manual scaling.
- C. Incorrect.
This is incorrect. Manually managing EC2 instances is inefficient and error-prone, especially for unpredictable traffic spikes. Automated scaling solutions like Amazon EC2 Auto Scaling are better suited for this use case.
- D. Incorrect.
This is incorrect. Using a fixed number of EC2 instances with Reserved Instances may reduce costs during steady traffic but will not handle sudden spikes effectively. This approach does not provide the scalability required for variable traffic patterns.