Q22 — AWS SAA-C03 Ch.15
Question 22 of 100 | ← Chapter 15
Q1122. A company runs a web application that uses Amazon RDS for MySQL to store relational data. Data in the database does not change frequently.A solutions architect notices that during peak usage times, the database has performance issues when it serves the data. The company wants to improve the performance of the database.Which combination of steps will meet these requirements?(Select TWO.)
- A. Integrate AWS WAF with the application.
- B. Create a read replica for the database. Redirect read traffic to the read replica. ✓
- C. Create an Amazon ElastiCache (Memcached) cluster. Configure the application and the database to integrate with the cluster. ✓
- D. Use the Amazon S3 One Zone-Infrequent Access (S3 One Zone-IA) storage class to store the data that changes infrequently.
- E. Migrate the database to Amazon DynamoDB. Configure the application to use the DynamoDB database.
Correct Answer: B. Create a read replica for the database. Redirect read traffic to the read replica., C. Create an Amazon ElastiCache (Memcached) cluster. Configure the application and the database to integrate with the cluster.
Explanation
To improve the performance of the Amazon RDS for MySQL database during peak usage times, the following combination of steps will be effective:B. Create a read replica for the database. Redirect read traffic to the read replica.C. Create an Amazon ElastiCache (Memcached) cluster. Configure the application and the database to integrate with the cluster.Explanation:B: Creating a read replica allows for offloading read traffic from the primary database instance. This helps improve performance by reducing the load on the primary database, especially during peak usage times.C: Implementing Amazon ElastiCache (Memcached) can significantly enhance performance by caching frequently accessed data in memory. This reduces the number of direct reads from the database, further alleviating load and improving response times.Why Other Options Are Not Suitable:A: Integrating AWS WAF (Web Application Firewall) is primarily focused on security and does not directly contribute to improving database performance.D: Using the S3 One Zone-IA storage class is not applicable for improving RDS performance, as this storage class is intended for infrequently accessed data and does not pertain to database operations.E: Migrating to Amazon DynamoDB may not be necessary and could involve significant changes to the application architecture, which may not directly address the immediate performance issues with the existing RDS setup.Thus, options B and C provide a focused and effective strategy to enhance the performance of the RDS for MySQL database.To improve the performance of an Amazon RDS for MySQL database that experiences slowdowns during peak read traffic (with infrequently changing data), the best approach is to offload read workloads and cache frequently accessed data. Here's the analysis of the options:Key Requirements:Improve Read Performance: The database struggles under high read load during peak times. Infrequently Changing Data: The data is static or rarely updated, making it suitable for caching. No Need for Full Migration: The existing RDS for MySQL is sufficient for writes; only read performance needs optimization.Option Analysis:Option A:Integrate AWS WAF with the application.Why This Fails:AWS WAF is for web application firewall protection (blocking SQL injection, DDoS, etc.).It does not improve database performance.Option B:Create a read replica for the database. Redirect read traffic to the read replica.Why This Works:Read Replicas are read-only copies of the primary database. Offloading read queries to replicas reduces load on the primary database, improving performance. Ideal for Infrequently Changing Data: Since writes are rare, replicas stay in sync with minimal lag.Option C:Create an Amazon ElastiCache (Memcached) cluster. Configure the application and the database to integrate with the cluster.Why This Works:ElastiCache (Memcached) caches frequently accessed data in memory, reducing the need for repeated database queries.Ideal for Infrequently Changing Data: Since data rarely changes, cache hits will be high, significantly improving read performance.Option D:Use the Amazon S3 One Zone-Infrequent Access (S3 One Zone-IA) storage class to store the data that changes infrequently.Why This Fails:S3 One Zone-IA is for object storage, not relational database data. The database cannot use S3 as a backend storage layer for MySQL.Option E:Migrate the database to Amazon DynamoDB. Configure the application to use the DynamoDB database.Why This Fails:DynamoDB is a NoSQL database, not a drop-in replacement for RDS for MySQL (which is relational). Migrating would require significant application rewrites (not operationally efficient for performance tuning).Best Combination: B & CRead Replicas (Option B):Offload read queries to replicas, reducing load on the primary database.ElastiCache (Memcached) (Option C):Cache frequently accessed data in memory, minimizing database queries.Final Answer:B. Create a read replica for the database. Redirect read traffic to the read replica. C. Create an Amazon ElastiCache (Memcached) cluster. Configure the application and the database to integrate with the cluster.