SAP-C02 Question 625
Single answerYour company runs a web application on Amazon EC2 instances behind an Application Load Balancer (ALB). The application experiences unpredictable spikes in traffic, and your team wants to optimize for cost while ensuring the application remains highly available. Which solution would be the MOST effective way to achieve this requirement?
- A
Use On-Demand Instances for all EC2 instances behind the ALB to ensure availability during traffic spikes.
- B
Use Spot Instances for all EC2 instances behind the ALB to reduce costs.
- C
Use an Auto Scaling group with a mix of On-Demand and Spot Instances, and configure the scaling policies based on target utilization metrics.
- D
Use Reserved Instances for all EC2 instances behind the ALB to reduce costs.
Show answer and explanation
Correct answer: C
Explanation
The best solution is to use an Auto Scaling group with a mix of On-Demand and Spot Instances (Option 3). This approach balances cost optimization and availability. Spot Instances help reduce costs, while On-Demand Instances provide reliability during traffic spikes. Configuring scaling policies based on utilization metrics ensures that the infrastructure adjusts dynamically to meet the application’s needs.
- A. Incorrect.
On-Demand Instances provide high availability, but they are the most expensive EC2 instance pricing model. This option does not optimize for cost during unpredictable traffic spikes.
- B. Incorrect.
Spot Instances are the most cost-effective, but they can be interrupted with little notice. Using only Spot Instances may compromise availability, especially during traffic spikes.
- C. Correct.
Using an Auto Scaling group with a mix of On-Demand and Spot Instances provides both cost optimization and high availability. The Spot Instances reduce costs, while On-Demand Instances ensure availability during traffic spikes. Scaling policies based on utilization metrics allow the system to dynamically adjust capacity as needed.
- D. Incorrect.
Reserved Instances offer significant cost savings for predictable, steady-state workloads. However, they are not well-suited for handling unpredictable traffic spikes as they lack flexibility.