Question

Difficulty: MediumImproving Database and Caching Efficiency

A digital subscription platform hosts a video-on-demand service. The media catalog database runs on an Amazon RDS for MySQL Multi-AZ DB instance. During popular show releases, the database experiences CPU utilization spikes up to 95% and application servers report database connection timeouts due to a massive surge in read-heavy traffic. The catalog metadata is highly static and updated only once per day. A Solutions Architect must optimize the database layer to reduce latency, prevent connection exhaustion on the database, and ensure that the caching layer is highly available and resilient to node failures. Which two actions should the Solutions Architect take to achieve these objectives? (Select two.)

  1. Deploy an Amazon ElastiCache for Redis cluster with replication enabled to cache database queries for the media catalog.Answer
  2. Deploy Amazon RDS Proxy between the application servers and the Amazon RDS DB instance to pool database connections.Answer
  3. C
    Configure the application servers to direct read queries to the standby DB instance of the Multi-AZ deployment.
  4. D
    Deploy an Amazon ElastiCache for Memcached cluster and configure Auto Discovery to handle replication and failover across multiple Availability Zones.
  5. E
    Deploy an Amazon ElastiCache for Memcached cluster with a write-through strategy to persist cache updates to the RDS database.

Answer

The correct actions are deploying an Amazon ElastiCache for Redis cluster with replication enabled to cache database queries, and deploying Amazon RDS Proxy to pool database connections.
Deploying an Amazon ElastiCache for Redis cluster with replication enabled provides a highly available, replicated cache that offloads static catalog reads from the database. Deploying Amazon RDS Proxy handles connection pooling, preventing connection exhaustion and timeouts during traffic spikes.

Step-by-Step Solution

1
Analyze the database workload and bottleneck.
The media catalog data is highly static and read-heavy, making it an ideal candidate for caching to reduce database CPU load.
Offloading frequent reads from the database to an in-memory cache directly resolves database CPU spikes.
2
Evaluate high availability requirements for the cache.
Amazon ElastiCache for Redis with replication is selected over Memcached.
The caching tier must be highly available and resilient to node failures. ElastiCache for Redis supports replication and automatic failover, whereas Memcached does not.
3
Address database connection exhaustion.
Amazon RDS Proxy is introduced between the application servers and the RDS DB instance.
RDS Proxy pools database connections, preventing connection exhaustion and timeouts when application servers scale out during spikes.

Key Concept

Optimizing database performance using ElastiCache for Redis for high-availability caching, and managing connection pooling using Amazon RDS Proxy.
Rate this question