Course menuSAA-C03

Exams / SAA-C03 / Database read scaling / Question 2

SAA-C03 practice question: Database read scaling (2 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.

An online retailer runs its product catalogue on an Amazon Aurora MySQL cluster that has a single writer instance and no other instances. At peak, the writer's CPU reaches 90%, and about 85% of the queries are read-only catalogue lookups. Catalogue pages can show data that is up to 1 second old. Read traffic is expected to double before the holiday season. The developers can change connection settings, but they do not have time to rewrite the data-access code. Which solution meets these requirements with the LEAST application change?

Choose one answer.

  1. A. Add two Aurora Replicas in different Availability Zones, and point the application's read-only connections at the cluster's reader endpoint.
  2. B. Create an Amazon RDS Proxy for the cluster, and point all of the application's database connections at the proxy's default endpoint so they are pooled.
  3. C. Create an Amazon ElastiCache cluster, and cache the results of the catalogue queries in it using a lazy-loading pattern in the application.
  4. D. Add an Aurora Global Database secondary cluster in another AWS Region, and send the application's catalogue read queries to that cluster.
Show the answer and explanation

Answer: A

  • A. Right: Correct. Aurora Replicas share the cluster volume, so they are quick to add and usually lag the writer by much less than 100 milliseconds, well inside the 1-second tolerance. The reader endpoint balances connections across the replicas, so the only change is a connection string for read-only work. Learn more: Replication with Amazon Aurora (opens in a new tab)
  • B. Wrong: RDS Proxy pools and reuses connections, which helps when opening connections is the problem. It does not add query capacity, and connections to the proxy's default endpoint are all handled by the Aurora writer, so the CPU load stays on the same instance. Read capacity has to come from adding Aurora Replicas. Learn more: Amazon RDS Proxy for Aurora (opens in a new tab)
  • C. Wrong: A cache in front of the database can take a large share of repeated reads off the writer. However, lazy loading is implemented in the application's data-access code (check the cache, query on a miss, then populate the cache), which the developers do not have time to rewrite. Learn more: Caching patterns (opens in a new tab)
  • D. Wrong: A Global Database secondary cluster can serve reads, but it is designed for disaster recovery and for readers located in another Region. Sending this application's reads across Regions adds network latency and pays for a second cluster, when Aurora Replicas in the same Region give the read capacity more simply. Learn more: Using Amazon Aurora Global Database (opens in a new tab)

Explanation

The writer is overloaded by reads, and the data can be slightly stale, so the fix is to add read capacity within the same cluster. Aurora Replicas share the cluster's storage, typically lag by well under 100 ms, and the reader endpoint spreads connections across them, so the application only needs a different connection string for its read-only work. RDS Proxy pools connections but adds no capacity, a cache needs code changes, and a cross-Region secondary adds latency and cost.

Study

Keep practising

Answer questions with a score at the end, or practise just this topic with the explanation after each one. No sign-up needed.