Question

Difficulty: HardImproving Database and Caching Efficiency

A luxury watch retailer hosts its online storefront on AWS, using an Amazon Aurora MySQL database cluster with one writer and two reader instances to manage product cataloging and real-time inventory reservations. During high-traffic product releases, customers experience transaction failures, and the database writer node experiences 100% CPU utilization, leading to database connection timeouts and application-level thread exhaustion. An analysis shows that the bottleneck is caused by high-concurrency database connections and frequent read-modify-write operations on the inventory table. The retailer requires a solution that guarantees sub-millisecond read latency for inventory status, maintains transactional persistence for reservations, and scales automatically to handle connection spikes while maintaining high availability. Which two of the following architectural changes should the Solutions Architect implement to resolve the performance bottlenecks?

  1. Deploy an Amazon ElastiCache for Redis replication group with Multi-AZ and automatic failover enabled to cache inventory status and manage reservation states.Answer
  2. Deploy Amazon RDS Proxy between the application layer and the Amazon Aurora MySQL cluster to pool and reuse database connections, minimizing connection overhead on the database writer.Answer
  3. C
    Deploy an Amazon ElastiCache for Memcached cluster to cache inventory counts, and enable multi-node replication to ensure high availability and data persistence.
  4. D
    Configure Aurora Auto Scaling to dynamically scale the number of Aurora Replicas to offload the write-modify-read reservation workload during peak traffic.
  5. E
    Migrate the database to an Amazon RDS for MySQL Multi-AZ deployment and configure the standby instance to process read-modify-write queries.

Answer

Deploying an Amazon ElastiCache for Redis replication group with Multi-AZ and automatic failover enabled, and deploying Amazon RDS Proxy between the application layer and the Amazon Aurora MySQL cluster.
The correct solution involves deploying Amazon ElastiCache for Redis to achieve sub-millisecond latencies, with Multi-AZ and automatic failover enabled to meet the persistence and high availability requirements. Simultaneously, deploying Amazon RDS Proxy pools and reuses database connections, resolving connection bottlenecks and preventing thread pool exhaustion on the primary writer.

Step-by-Step Solution

1
Analyze the bottleneck on the database writer due to connection spikes and connection timeouts.
Identify that connection overhead is causing thread pool exhaustion, which can be mitigated by introducing Amazon RDS Proxy to pool and reuse connections.
RDS Proxy sits between the application and database to prevent excessive connection creation and reuse existing pools.
2
Identify the cache requirements for inventory reservations: sub-millisecond latency, persistence, and replication/high availability.
Choose Amazon ElastiCache for Redis over Memcached because Redis supports persistence, replication, and Multi-AZ failover.
Memcached is transient, lacks built-in replication/failover, and cannot guarantee data persistence for active reservations.
3
Evaluate replica scaling options for handling the write-modify-read reservation load.
Determine that read replicas (Aurora Replicas or RDS Standby instances) cannot process write operations or offload the primary writer's reservation updates.
Writes must execute on the primary writer, making replica scaling ineffective for write-heavy hotspots.

Key Concept

To handle write-modify-write bottlenecks and connection spikes in a database cluster, introduce a connection proxy (like Amazon RDS Proxy) and offload low-latency states to a persistent, highly available cache (like Amazon ElastiCache for Redis).
Estimated Time:3m 0s
Rate this question