SOA-C02 Question 317
Select 3Your company runs a web application hosted on Amazon EC2 instances behind an Application Load Balancer (ALB). Users report intermittent slow response times during peak traffic periods. After reviewing the environment, you notice that the CPU utilization of the EC2 instances reaches over 90% during these times. What actions should you take to optimize performance and handle peak traffic efficiently?
- A
Enable auto-scaling for the EC2 instances and define scaling policies based on CPU utilization.
- B
Migrate the application to AWS Lambda to handle increased traffic with serverless scalability.
- C
Upgrade the instance types for the EC2 instances to a higher performance tier.
- D
Enable HTTP/2 on the Application Load Balancer to improve connection handling and reduce latency.
- E
Cache frequently accessed data using Amazon ElastiCache.
Show answer and explanation
Correct answers: A, C, E
Explanation
To optimize performance during peak traffic, enabling auto-scaling ensures EC2 instances scale dynamically based on demand, addressing high CPU utilization. Upgrading to higher-performance instance types provides additional compute capacity. Additionally, caching frequently accessed data using Amazon ElastiCache reduces the workload on the EC2 instances by offloading repetitive operations. These combined strategies effectively handle peak traffic and improve application performance.
- A. Correct.
Correct: Enabling auto-scaling ensures that additional instances are launched automatically when CPU utilization exceeds defined thresholds, helping handle peak traffic efficiently.
- B. Incorrect.
Incorrect: Migrating to AWS Lambda may not be feasible in this situation as it requires application refactoring. This is not a direct performance optimization strategy for the existing EC2-based architecture.
- C. Correct.
Correct: Upgrading the instance types provides more compute power and can directly address high CPU utilization, improving performance during peak traffic.
- D. Incorrect.
Incorrect: While enabling HTTP/2 can improve connection handling and reduce latency, it does not address the root cause of high CPU utilization on the EC2 instances.
- E. Correct.
Correct: Using Amazon ElastiCache to cache frequently accessed data reduces the load on the EC2 instances by offloading repetitive database queries, improving overall performance.