Question

Difficulty: HardImproving Database and Caching Efficiency

A digital document management and e-signature platform uses an Amazon RDS for PostgreSQL DB instance to track active user signing sessions, signer verification states, and document metadata. During peak business hours at the end of the fiscal quarter, the database CPU utilization exceeds 92%92\% due to a surge in read-heavy queries verifying session tokens and user permissions. The application requires session data to be highly available, replicate across multiple Availability Zones to prevent data loss during failovers, and maintain sub-millisecond retrieval times. The solutions architect must optimize the database layer to resolve the performance bottleneck while meeting these availability and persistence requirements.

Which of the following database and caching strategies should the solutions architect implement?

  1. A
    Enable Multi-AZ deployment on the RDS PostgreSQL database. Configure the application to split read and write queries, directing read queries for session states and tokens to the standby replica to reduce CPU load on the primary database instance.
  2. Deploy an Amazon ElastiCache for Redis cluster with replication enabled across multiple Availability Zones. Configure the application to store session tokens and verification states in the Redis cluster utilizing a cache-aside pattern, and query the RDS PostgreSQL database only on cache misses.Answer
  3. C
    Deploy an Amazon ElastiCache for Memcached cluster with nodes distributed across multiple Availability Zones. Enable automated snapshots and cross-AZ replication for the Memcached nodes, and configure the application to cache session validation states in Memcached to offload the database.
  4. D
    Migrate the session table to a single-node Amazon ElastiCache for Redis instance. Configure the database replication parameter group to synchronize the Redis database directly with the RDS PostgreSQL instance using an AWS Database Migration Service (AWS DMS) task.

Answer

Deploying an Amazon ElastiCache for Redis cluster with replication enabled across multiple Availability Zones, and configuring the application to store session tokens and states in the cluster utilizing a cache-aside pattern.
The correct strategy implements ElastiCache for Redis with replication enabled across multiple Availability Zones. This meets the requirement of high availability and prevents data loss in the event of an Availability Zone outage. Storing session tokens and user permissions using a cache-aside pattern offloads the high CPU read-heavy queries from the RDS PostgreSQL database, maintaining sub-millisecond latencies for active sessions.

Step-by-Step Solution

1
Identify the performance bottleneck and database workload characteristics.
The bottleneck is caused by read-heavy queries verifying session tokens and user permissions on RDS PostgreSQL.
This establishes that a caching mechanism is required to offload the high volume of reads from the primary relational database.
2
Evaluate the requirements for the session cache layer.
The cache layer requires sub-millisecond retrieval times, high availability, replication across multiple Availability Zones to prevent data loss, and data persistence/durability support.
This rules out caching engines or configurations that do not support multi-AZ replication or data persistence.
3
Compare caching engines (Redis vs Memcached).
Memcached is a simple key-value store that lacks data persistence, replication, and multi-AZ automatic failover. Redis supports replication, multi-AZ auto-failover, and persistence.
This rules out the option using ElastiCache for Memcached.
4
Compare database read offloading architectures.
An RDS Multi-AZ standby replica is passive and cannot accept read queries. Caching is more optimal than deploying read replicas for sub-millisecond latencies.
This rules out the option proposing routing reads to the standby replica.
5
Select the strategy that combines a Multi-AZ ElastiCache for Redis cluster with a cache-aside pattern.
The database read load is successfully reduced, and session retrieval times are reduced to sub-milliseconds, while maintaining data persistence and high availability.
This architecture meets all technical and business requirements.

Key Concept

Distinguishing between Amazon ElastiCache for Redis and ElastiCache for Memcached features, and understanding RDS Multi-AZ replication capabilities.
Estimated Time:2m 0s
Rate this question