MLS-C01 Question 280
Select 3You are deploying a machine learning model as a web application hosted on Amazon EC2 instances. The application has unpredictable traffic patterns, with periods of high demand followed by minimal activity. You need to design a scalable and cost-effective solution that ensures availability and performance. Which of the following options should you implement?
- A
Create an Auto Scaling group with a target tracking scaling policy based on CPU utilization.
- B
Manually launch and terminate EC2 instances based on traffic patterns.
- C
Set the desired capacity in the Auto Scaling group to the maximum expected traffic level.
- D
Use an Application Load Balancer (ALB) to distribute traffic across instances in the Auto Scaling group.
- E
Configure a scheduled scaling policy to handle known traffic spikes.
Show answer and explanation
Correct answers: A, D, E
Explanation
To handle unpredictable traffic patterns efficiently, you should use an Auto Scaling group with a target tracking scaling policy to dynamically adjust the number of instances based on demand. An Application Load Balancer (ALB) ensures that traffic is evenly distributed across instances, while a scheduled scaling policy can handle predictable traffic spikes, optimizing cost and performance.
- A. Correct.
Correct: A target tracking scaling policy allows the Auto Scaling group to automatically adjust the number of instances based on metrics like CPU utilization, ensuring responsiveness to unpredictable traffic patterns.
- B. Incorrect.
Incorrect: Manually managing EC2 instances is not scalable and is prone to human error, making it unsuitable for handling unpredictable traffic.
- C. Incorrect.
Incorrect: Setting the desired capacity to the maximum expected traffic level would waste resources during low-demand periods and is not cost-effective.
- D. Correct.
Correct: An ALB ensures traffic is evenly distributed across the instances in the Auto Scaling group, improving availability and performance.
- E. Correct.
Correct: Scheduled scaling policies help proactively prepare for predictable traffic spikes, complementing the target tracking policy for unpredictable periods.