SAA-C03 Question 264
Single answerA company hosts a web application on Amazon EC2 instances behind an Application Load Balancer (ALB). Traffic to the application varies significantly depending on the time of day, with traffic spikes occurring unpredictably. The company wants to ensure that the application can handle traffic surges seamlessly while keeping costs optimized. Which solution is the most appropriate to meet these requirements?
- A
Manually provision additional EC2 instances during peak traffic hours and terminate them during low traffic periods.
- B
Configure an Amazon EC2 Auto Scaling group with dynamic scaling policies based on CPU utilization metrics.
- C
Use Reserved Instances for all EC2 instances to handle the workload during traffic surges.
- D
Deploy the application on a single large EC2 instance with enhanced networking capabilities.
Show answer and explanation
Correct answer: B
Explanation
The best solution is to use Amazon EC2 Auto Scaling with dynamic scaling policies. This approach allows the application to automatically adjust the number of instances based on traffic demands, providing both scalability and cost efficiency. Manually provisioning instances or using a single large instance is not practical or scalable for unpredictable traffic patterns. Reserved Instances, while cost-effective for predictable workloads, lack the flexibility required to handle traffic surges effectively.
- A. Incorrect.
Manually provisioning and terminating instances is not scalable or efficient, especially when traffic patterns are unpredictable. This approach increases management overhead and does not align with the elastic nature of cloud computing.
- B. Correct.
Configuring an Amazon EC2 Auto Scaling group with dynamic scaling policies ensures that the application can automatically scale the number of instances up or down based on real-time CPU utilization metrics. This approach offers scalability, cost optimization, and aligns with AWS best practices.
- C. Incorrect.
Reserved Instances are useful for predictable, steady-state workloads but are not suitable for handling traffic surges because they do not provide the flexibility or elasticity required for variable traffic patterns.
- D. Incorrect.
A single large EC2 instance might handle a fixed amount of traffic but does not provide elasticity or fault tolerance. If the instance fails, the application will experience downtime, and it does not scale to handle unpredictable traffic spikes.