Question

Difficulty: MediumImproving Database and Caching Efficiency

A logistics company runs an on-demand delivery platform. The backend API layer runs on Amazon Elastic Container Service (Amazon ECS) on AWS Fargate and connects to an Amazon Aurora PostgreSQL database cluster. During peak morning dispatch periods, database CPU utilization exceeds 95%95\% and the application experiences connection exhaustion, leading to degraded query response times. Application analysis reveals a high volume of read queries for delivery driver session states and route calculations. The application requires that driver session states be cached with sub-millisecond latency. Furthermore, the cache must survive node restarts and support replication across multiple Availability Zones to maintain high availability. Additionally, the database connections must be managed efficiently to handle high connection spikes from the containerized tasks.

Which of the following actions should a Solutions Architect recommend to improve database and caching efficiency? (Select TWO.)

  1. Deploy an Amazon ElastiCache for Redis cluster with replication and automatic failover enabled to cache the session states.Answer
  2. B
    Deploy an Amazon ElastiCache for Memcached cluster with multi-node replication to cache the session states.
  3. C
    Configure the application to direct read traffic to the secondary standby instance of the database cluster.
  4. Implement Amazon RDS Proxy to manage connection pooling and reduce CPU overhead on the database cluster.Answer
  5. E
    Use Amazon ElastiCache for Memcached with append-only file (AOF) persistence enabled to cache the session states.

Answer

Deploy an Amazon ElastiCache for Redis cluster with replication and automatic failover enabled to cache the session states, and implement Amazon RDS Proxy to manage connection pooling and reduce CPU overhead on the database cluster.
Deploying Amazon ElastiCache for Redis fulfills the requirements for low latency, cross-AZ replication, and persistence to survive node restarts. Implementing Amazon RDS Proxy effectively pools and manages connection handshakes between the scaling containerized tasks and the Aurora PostgreSQL cluster, reducing connection exhaustion and database CPU utilization.

Step-by-Step Solution

1
Evaluate the caching requirements for session states.
Identify that the cache requires sub-millisecond latency, replication across multiple Availability Zones, and persistence to survive node restarts.
This rules out Amazon ElastiCache for Memcached, which does not support replication, automatic failover, or persistence features.
2
Address the connection exhaustion and high CPU utilization on the database.
Determine that containerized Fargate tasks frequently opening and closing connections cause CPU spikes and pool exhaustion.
Implementing Amazon RDS Proxy pools connections, reducing CPU usage and resolving connection exhaustion.

Key Concept

Selecting the appropriate caching engine (Redis vs. Memcached) based on persistence/replication requirements, and resolving database connection overhead using Amazon RDS Proxy.
Estimated Time:2m 0s
Rate this question