Which solution meets these requirements?
Create an Amazon CloudWatch alarm to monitor application latency and increase the size of each EC2 instance if the desired threshold is reached.
Create an Amazon EventBridge (Amazon CloudWatch Events) rule to monitor application latency and add an EC2 instance to the ALB if the desired threshold is reached.
Deploy the application to an Auto Scaling group of EC2 instances with a target tracking scaling policy. Attach the ALB to the Auto Scaling group.
Deploy the application to an Auto Scaling group of EC2 instances with a scheduled scaling policy. Attach the ALB to the Auto Scaling group.
Explanations:
Scaling the EC2 instance size may not effectively address variable traffic patterns. Increasing instance size doesn’t automatically scale the number of instances based on load, and it might not resolve performance degradation quickly enough.
While EventBridge can trigger scaling actions, it is not the most efficient way to handle dynamic scaling based on traffic. Monitoring application latency through EventBridge requires more manual intervention and lacks the dynamic scaling of EC2 instances based on demand.
An Auto Scaling group with a target tracking scaling policy adjusts the number of EC2 instances based on real-time demand. This is the most effective solution to dynamically scale the application based on traffic fluctuations, and it integrates directly with the ALB for traffic distribution.
A scheduled scaling policy is based on predetermined times or patterns, which doesn’t address unexpected or random increases in traffic. It lacks the dynamic scaling needed to respond to varying loads.