Question

Difficulty: HardImproving Database and Caching Efficiency

A financial services firm runs a real-time card payment validation service. The platform performs verification checks against a database containing merchant validation rules, risk profiles, and transaction velocity limits. The database is hosted on a write-heavy Amazon RDS for PostgreSQL DB instance. During high-volume shopping events, validation read latency spikes to over 150150 milliseconds due to read contention, causing payment timeouts. The architecture requires a caching layer to reduce read latency to sub-millisecond levels. The validation data is highly dynamic, requiring key-value replication across Availability Zones, automated failover, and the ability to persist the cached data structures to disk to support rapid recovery. Which architecture should a solutions architect recommend to optimize the database performance and meet these caching requirements?

  1. A
    Deploy an Amazon ElastiCache for Memcached cluster with multiple nodes spanning across multiple Availability Zones, and configure the validation service to use it as a read-through cache.
  2. B
    Configure the RDS PostgreSQL Multi-AZ DB instance to direct validation read traffic to the standby DB instance in the secondary Availability Zone, and enable pg_transport for caching.
  3. Deploy an Amazon ElastiCache for Redis cluster with Multi-AZ enabled and replication groups, and configure the validation service to query the cache before the database.Answer
  4. D
    Deploy an Amazon DynamoDB Accelerator (DAX) cluster to cache the PostgreSQL queries, and update the application code to use the DAX client for read operations.

Answer

Deploying an Amazon ElastiCache for Redis cluster with Multi-AZ enabled and replication groups, and configuring the validation service to query the cache before the database.
Deploying an Amazon ElastiCache for Redis cluster with Multi-AZ and replication groups satisfies all requirements. Redis supports data persistence, multi-AZ replication, and automated failover, which are necessary for the rapid recovery of the validation data.

Step-by-Step Solution

1
Analyze the validation service requirements.
The target solution must deliver sub-millisecond read latency, support key-value caching, replicate across Availability Zones, provide automated failover, and support data persistence for rapid recovery.
This establishes the technical constraints for selecting the database optimization and caching pattern.
2
Evaluate ElastiCache engine options against the constraints.
Amazon ElastiCache for Redis supports replication, Multi-AZ with automatic failover, and data persistence (AOF and RDB backups). Amazon ElastiCache for Memcached does not support persistence, replication, or automatic failover.
This rules out Memcached-based solutions due to lack of replication and durability.
3
Evaluate RDS database tier capabilities.
RDS PostgreSQL standby instances in Multi-AZ deployments are passive and cannot serve read traffic. Offloading read queries requires either an external cache or RDS Read Replicas.
This rules out attempting to route queries directly to the RDS standby DB instance.
4
Evaluate DynamoDB Accelerator compatibility.
DynamoDB Accelerator (DAX) is designed exclusively for Amazon DynamoDB and cannot front an RDS PostgreSQL instance.
This rules out DAX as a valid caching option for this relational database configuration.

Key Concept

Improving Database and Caching Efficiency
Estimated Time:3m 0s
Rate this question