Question

Difficulty: Very hardImproving Database and Caching Efficiency

A global advertising technology (ad-tech) company runs a real-time bidding platform that stores user profile segments in Amazon DynamoDB. During high-traffic campaigns, the DynamoDB tables experience significant read throttling despite having DynamoDB Auto Scaling enabled. The application requires sub-millisecond response times for segment lookups to meet bidding window SLA limits. The architecture team wants to introduce a caching layer to cache the lookups. The cached user profile data must be replicated across three Availability Zones to prevent cache stampedes in case of a zone failure, support active data persistence to survive cache node restarts, and allow the application to execute atomic updates on list-based segment identifiers within the cache. Which caching strategy should the solutions architect implement to address these requirements?

  1. A
    Implement Amazon ElastiCache for Memcached with nodes distributed across three Availability Zones, enabling automatic failover and configuring regular snapshots of the cache nodes to Amazon S3 for data persistence.
  2. Implement Amazon ElastiCache for Redis with cluster mode enabled, deploying replication groups across three Availability Zones with automatic failover, and utilizing Append Only File (AOF) persistence.Answer
  3. C
    Implement Amazon ElastiCache for Memcached with a multi-node cluster, configuring Auto-Discovery to handle node additions and utilizing an application-managed background process to persist cached segments to DynamoDB.
  4. D
    Implement Amazon ElastiCache for Memcached and configure an AWS Lambda function triggered by Amazon EventBridge to periodically dump and backup the in-memory cache data to an Amazon S3 bucket.

Answer

Implement Amazon ElastiCache for Redis with cluster mode enabled, deploying replication groups across three Availability Zones with automatic failover, and utilizing Append Only File (AOF) persistence.
Implementing Amazon ElastiCache for Redis with cluster mode enabled meets all constraints. Redis supports multi-AZ replication with automatic failover, ensuring high availability and preventing cache stampedes. It also supports Append Only File (AOF) persistence to preserve cache state across restarts, and natively provides atomic operations on list-based segment identifiers.

Step-by-Step Solution

1
Analyze the technical requirements: sub-millisecond response times, Multi-AZ replication across three Availability Zones, active data persistence, and support for atomic list operations.
Identify that the solution requires a caching engine that supports advanced data structures (lists), high availability (Multi-AZ with automatic failover), and persistence mechanisms.
This narrows down the caching engine choices between ElastiCache for Memcached, ElastiCache for Redis, and DynamoDB Accelerator (DAX).
2
Evaluate Amazon ElastiCache for Memcached against the requirements.
Memcached is ruled out because it does not support data replication, automatic failover, persistence (snapshots/AOF), or native complex data structures like lists.
Choosing Memcached would fail the replication, persistence, and atomic list updates requirements.
3
Evaluate Amazon ElastiCache for Redis against the requirements.
Redis supports cluster mode enabled (which allows replication across multiple AZs and automatic failover), Append Only File (AOF) persistence for node restarts, and native list data types with atomic operations (e.g., LPUSH, RPUSH).
This matches all business and technical requirements perfectly.

Key Concept

Selecting the appropriate caching engine (Redis vs. Memcached) based on replication, persistence, and data structure requirements.
Estimated Time:3m 0s
Rate this question