Question

Difficulty: EasyImproving Database and Caching Efficiency

A retail company wants to improve the response time of its product catalog website, which is backed by an Amazon RDS for PostgreSQL database. The catalog data is read-heavy and does not change frequently, but the caching layer must be highly available, support data replication across multiple Availability Zones, and allow for automatic failover.

Which two actions should a solutions architect recommend to implement this caching layer? (Select TWO.)

  1. Deploy Amazon ElastiCache for Redis in a Multi-AZ replication group.Answer
  2. Modify the application code to read from the cache first, and query the RDS database only if there is a cache miss.Answer
  3. C
    Deploy Amazon ElastiCache for Memcached with multi-node replication enabled.
  4. D
    Create an Amazon RDS PostgreSQL Read Replica and configure it in Multi-AZ mode to serve as the caching layer.
  5. E
    Deploy Amazon ElastiCache for Memcached and enable Multi-AZ with automatic failover.

Answer

Deploying Amazon ElastiCache for Redis in a Multi-AZ replication group and modifying the application code to query the cache first before the database.
Deploying Amazon ElastiCache for Redis in a Multi-AZ replication group provides the required high availability, automatic failover, and data replication across Availability Zones. Modifying the application to check the cache first before querying the RDS database implements the cache-aside pattern, which effectively offloads read-heavy query traffic and reduces response times.

Step-by-Step Solution

1
Analyze the requirements for high availability, multi-AZ replication, and automatic failover in the caching tier.
Determine that Amazon ElastiCache for Redis supports these clustering and high availability requirements, whereas Memcached does not.
Memcached does not support multi-AZ replication or automatic failover.
2
Determine the application logic required to utilize the caching layer.
Implement the cache-aside pattern where the application reads from the cache first and falls back to RDS on a cache miss.
This reduces query latency and offloads read traffic from the primary RDS PostgreSQL database.

Key Concept

Improving database efficiency by introducing a highly available, memory-based caching layer with ElastiCache for Redis using a cache-aside pattern.
Rate this question