SAA-C03 Question 121
Select 4Your company runs a web application on an Amazon EC2 instance backed by a single Amazon RDS database. During peak traffic hours, the application experiences performance issues due to high CPU usage on the EC2 instance and increased latency in processing database queries. Which of the following actions can you take to address the performance issues?
- A
Upgrade the EC2 instance type to a larger instance with more CPU and memory.
- B
Enable Auto Scaling for the EC2 instance to add more instances during peak hours.
- C
Migrate the database to an Amazon RDS instance with a larger instance size.
- D
Implement Amazon RDS Read Replicas to offload read queries from the primary database.
- E
Use Amazon ElastiCache to cache frequently accessed data and reduce load on the database.
Show answer and explanation
Correct answers: A, C, D, E
Explanation
This scenario involves both horizontal and vertical scaling to address performance issues. Upgrading the EC2 instance and RDS instance are vertical scaling solutions, where resources are increased on the existing instances. Adding RDS Read Replicas and using ElastiCache are horizontal scaling solutions that distribute the workload across multiple resources, helping to offload traffic from the primary database and improve overall performance. Auto Scaling for a single EC2 instance is not meaningful, as it cannot horizontally scale a single instance.
- A. Correct.
Upgrading the EC2 instance to a larger instance (vertical scaling) increases its CPU and memory capacity, directly addressing performance issues caused by high CPU usage.
- B. Incorrect.
Enabling Auto Scaling for a single EC2 instance is not applicable because Auto Scaling adds instances horizontally, but the application in this setup is not configured to run across multiple EC2 instances.
- C. Correct.
Migrating the database to a larger RDS instance (vertical scaling) improves its processing power and reduces query latency, addressing the database performance issues.
- D. Correct.
Using Amazon RDS Read Replicas (horizontal scaling) helps distribute read queries, reducing the load on the primary database and improving performance.
- E. Correct.
Amazon ElastiCache can cache frequently accessed data, reducing the number of queries to the database and improving overall application performance.