SAA-C03 practice question: Database read scaling (1 of 2)
Design High-Performing Architectures A free question from our original SAA-C03 practice exam. Try it, then open the answer to see why each option is right or wrong.
A subscription business runs its customer portal on an Amazon RDS for MySQL DB instance.
The finance team has started running large read-only reports during the working day, and database CPU reaches 95%, which slows portal transactions. Storage metrics show IOPS well below the provisioned limit.
The reports can use data that is up to 15 minutes old. The company wants the fix that needs the LEAST change to the portal and the reporting tool.
Which solution should a solutions architect recommend?
Choose one answer.
AA. Create a read replica of the DB instance, and change the reporting tool's connection to use the read replica's endpoint.
BB. Convert the DB instance to a Multi-AZ DB instance deployment, and point the reporting tool at the standby DB instance.
CC. Add an Amazon ElastiCache cluster, and change the reporting tool to cache each report's query results with a 15-minute TTL.
DD. Change the storage to Provisioned IOPS SSD (io2) with double the current IOPS, so that reports and transactions stop competing.
Show the answer and explanation
Answer: A
A. Right: Correct. The replica is kept up to date asynchronously, which suits reports that accept slightly old data, and the report queries then use the replica's CPU instead of the primary's. The only change is one connection string in the reporting tool. Learn more: Working with DB instance read replicas (opens in a new tab)
B. Wrong: In a Multi-AZ DB instance deployment, the standby exists for failover and cannot serve read traffic. The reports would have nowhere to run except the primary. A read replica, or a Multi-AZ DB cluster with readable standbys, is needed for reads. Learn more: Multi-AZ DB instance deployments (opens in a new tab)
C. Wrong: Caching helps when the same query runs again and again. Large finance reports are mostly different queries, so few would hit the cache, and the reporting tool would need code changes. A read replica moves all the report load with no code change. Learn more: Caching database query results (opens in a new tab)
D. Wrong: The metrics show the database is short of CPU, not IOPS, so faster storage would not remove the bottleneck. Reports and transactions would still share one instance's CPU. Moving the reports to a replica separates the workloads. Learn more: Amazon RDS DB instance storage (opens in a new tab)
Explanation
When read-only work competes with transactions for the same instance's CPU, a read replica gives that work its own copy of the data. Asynchronous replication is fine because the reports accept data up to 15 minutes old, and only the reporting tool's connection changes. The Multi-AZ standby cannot serve reads, and extra IOPS does not fix a CPU bottleneck.
Want more on Database read scaling? The 5 full-length practice sets have 10 more Database read scaling questions, 325 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets →