
Answer-first summary for fast verification
Answer: Migrate the database to Amazon Aurora MySQL. Replace the read replicas with Aurora Replicas, and configure Aurora Auto Scaling. Replace the stored procedures with Aurora MySQL native functions.
## Explanation **Correct Answer: A** **Why Option A is correct:** 1. **Amazon Aurora MySQL** is specifically designed for high performance and low replication lag. Aurora Replicas use a shared storage architecture where all replicas read from the same storage volume, which significantly reduces replication lag compared to traditional MySQL replication. 2. **Aurora Auto Scaling** automatically adds or removes Aurora Replicas based on load, helping to maintain performance during peak traffic without manual intervention. 3. **Aurora MySQL native functions** can replace stored procedures with more efficient, database-native implementations that reduce processing overhead. 4. This solution minimizes application code changes (migration to Aurora is mostly transparent to applications) and minimizes operational overhead (Aurora Auto Scaling handles replica management automatically). **Why Option B is incorrect:** - While ElastiCache can reduce database load, it requires significant application code changes to implement caching logic. - Replacing stored procedures with Lambda functions also requires major application changes. - This solution doesn't directly address the replication lag issue; it just reduces database load. **Why Option C is incorrect:** - Running MySQL on EC2 instances would increase operational overhead (managing instances, backups, patching). - Traditional MySQL replication on EC2 would likely have similar or worse replication lag issues. - Large EC2 instances are more expensive and don't solve the fundamental replication architecture limitations. **Why Option D is incorrect:** - Migrating from a relational database to DynamoDB (NoSQL) would require significant application code changes. - DynamoDB has a completely different data model and query patterns. - Replacing stored procedures with DynamoDB streams is a major architectural change. - This doesn't address the replication lag requirement in the context of the existing relational database architecture. **Key AWS Concepts:** - **Amazon Aurora** offers up to 15 low-latency read replicas with minimal replication lag (typically less than 100ms). - **Aurora Auto Scaling** automatically adjusts the number of Aurora Replicas based on CPU utilization or connections. - **Aurora's shared storage architecture** eliminates the need to copy data to replica instances, which is why replication lag is significantly reduced compared to traditional MySQL replication.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A company has deployed a web application on AWS. The company hosts the backend database on Amazon RDS for MySQL with a primary DB instance and five read replicas to support scaling needs. The read replicas must lag no more than 1 second behind the primary DB instance. The database routinely runs scheduled stored procedures.
As traffic on the website increases, the replicas experience additional lag during periods of peak load. A solutions architect must reduce the replication lag as much as possible. The solutions architect must minimize changes to the application code and must minimize ongoing operational overhead.
Which solution will meet these requirements?
A
Migrate the database to Amazon Aurora MySQL. Replace the read replicas with Aurora Replicas, and configure Aurora Auto Scaling. Replace the stored procedures with Aurora MySQL native functions.
B
Deploy an Amazon ElastiCache for Redis cluster in front of the database. Modify the application to check the cache before the application queries the database. Replace the stored procedures with AWS Lambda functions.
C
Migrate the database to a MySQL database that runs on Amazon EC2 instances. Choose large, compute optimized EC2 instances for all replica nodes. Maintain the stored procedures on the EC2 instances.
D
Migrate the database to Amazon DynamoDB. Provision a large number of read capacity units (RCUs) to support the required throughput, and configure on-demand capacity scaling. Replace the stored procedures with DynamoDB streams.