DVA-C02 Question 60
Single answerYour company runs a web application on a fleet of EC2 instances behind an Application Load Balancer (ALB). During seasonal traffic spikes, the application experiences significant latency due to high demand. To address this, you want to ensure the architecture can handle the increased traffic dynamically by scaling the infrastructure. Which solution would best meet this requirement?
- A
Configure an Auto Scaling group with appropriate scaling policies to dynamically adjust the number of EC2 instances based on demand.
- B
Manually launch additional EC2 instances during traffic spikes and terminate them when traffic decreases.
- C
Increase the instance size of the EC2 instances in the fleet to handle more traffic per instance.
- D
Enable caching in the ALB to reduce the number of requests hitting the EC2 instances.
Show answer and explanation
Correct answer: A
Explanation
Using an Auto Scaling group with appropriate scaling policies is the best solution for achieving scalability. It ensures that the number of EC2 instances dynamically adjusts based on traffic demands, maintaining performance during traffic spikes while optimizing costs during low-demand periods. This approach aligns with AWS best practices for building scalable and cost-effective architectures.
- A. Correct.
This is the correct option. An Auto Scaling group allows you to automatically adjust the number of EC2 instances based on demand, ensuring scalability and cost-efficiency during traffic spikes.
- B. Incorrect.
This is not a scalable or automated approach. Manually managing EC2 instances is error-prone and inefficient, especially during unpredictable traffic spikes.
- C. Incorrect.
While increasing instance size might temporarily handle more traffic, it does not dynamically scale the infrastructure based on demand and could become cost-inefficient.
- D. Incorrect.
ALB does not provide caching functionality. To enable caching, you would typically use a service like Amazon CloudFront, but this alone will not dynamically scale your infrastructure.