SAP-C02 Question 491
Select 3A global retail company is hosting its e-commerce application on AWS. The application uses multiple Amazon EC2 instances behind an Application Load Balancer (ALB) to handle incoming traffic. During a flash sale, the traffic to the application spikes unpredictably, causing intermittent slow responses for users. The company wants to ensure that its application scales automatically to handle traffic increases while minimizing costs. What combination of actions should the company take to address these requirements?
- A
Configure an Auto Scaling group with dynamic scaling policies based on application-specific CloudWatch metrics such as CPU utilization.
- B
Enable sticky sessions on the Application Load Balancer to ensure users are routed to the same EC2 instance.
- C
Use a target tracking scaling policy with the Auto Scaling group to maintain the average CPU utilization of instances at an optimal level.
- D
Pre-provision a fixed number of EC2 instances in the Auto Scaling group to handle peak traffic at all times.
- E
Set up scheduled scaling policies in the Auto Scaling group to scale out before expected traffic spikes.
Show answer and explanation
Correct answers: A, C, E
Explanation
To handle unpredictable traffic spikes during events like flash sales, the application must scale dynamically and efficiently. Configuring an Auto Scaling group with dynamic and target tracking scaling policies ensures that resources are adjusted in real-time based on demand. Additionally, using scheduled scaling policies allows the application to scale out in anticipation of known traffic patterns, ensuring consistent performance. These solutions collectively optimize costs and performance, addressing the requirements effectively.
- A. Correct.
This is correct. Configuring an Auto Scaling group with dynamic scaling policies allows the application to automatically adjust capacity based on real-time demand, improving performance and cost efficiency.
- B. Incorrect.
This is incorrect. While sticky sessions can help with user experience, they do not address the issue of scaling to handle unpredictable traffic spikes.
- C. Correct.
This is correct. A target tracking scaling policy automatically adjusts the number of EC2 instances to maintain a desired metric, such as CPU utilization, which helps manage traffic effectively.
- D. Incorrect.
This is incorrect. Pre-provisioning a fixed number of instances is not cost-effective and does not dynamically adjust to unpredictable traffic spikes, making it a suboptimal solution.
- E. Correct.
This is correct. Scheduled scaling policies help prepare the application for known traffic patterns, such as flash sales, by scaling out resources in advance.