An application needs a caching layer in front of its database to store frequently accessed data as sorted leaderboard entries that must survive a node reboot, and the team also wants built-in replication so a replica can take over if the primary cache node fails. Which ElastiCache engine and configuration fits, and why?
- ElastiCache for Memcached, because its multi-threaded architecture uses multiple CPU cores to serve leaderboard reads faster than a single-threaded engine
- ElastiCache for Memcached with automatic node recovery enabled, since Memcached automatically re-elects a replica as primary when a node fails
- ElastiCache for Redis, because it supports native sorted-set data structures for leaderboards, disk snapshots for persistence, and primary-replica replication for failover
- ElastiCache for Redis configured as a single node with no replicas, since Redis snapshots alone are sufficient to fail over between nodes automatically
Why C? And why not the others?
Correct answer: C. ElastiCache for Redis, because it supports native sorted-set data structures for leaderboards, disk snapshots for persistence, and primary-replica replication for failover
Redis is the ElastiCache engine that supports sorted-set data structures, which are the natural fit for ranked leaderboard entries, along with disk-based snapshots for persistence across a reboot and native primary-replica replication that provides an automatic failover target, matching every requirement stated. The option praising Memcached's multi-threading is wrong because that architectural advantage doesn't compensate for the fact that Memcached has no sorted-set data structure and no persistence at all, so leaderboard ranking and surviving a reboot are simply not possible on that engine regardless of thread count. The option describing Memcached automatic node recovery is wrong because Memcached has no built-in replication or failover mechanism whatsoever; its nodes operate independently, and a failed node's cached data is lost rather than taken over by a replica. The option describing a single Redis node with no replicas is wrong because a node with no replicas has nothing to fail over to; on-disk snapshots help with data persistence and recovery but do not substitute for replica-based automatic failover to another running node.
Source: AWS ElastiCache documentation: Redis OSS versus Memcached comparison