1.Redis vs Memcached Use Cases
ElastiCache runs three engines: Valkey, Redis OSS, and Memcached. Memcached is simpler and multithreaded, good for pure key-value object caching that must scale out across many nodes. Valkey and Redis OSS add data structures (sorted sets, hashes, lists), pub/sub, and replication with automatic failover, at the cost of being single-threaded per node.
Key features
- Memcached is multithreaded per node; Valkey and Redis OSS are not — a large Memcached node can use multiple CPU cores for one cache, Redis/Valkey scales cores by adding nodes/shards instead
- Memcached has no replication or automatic failover; Valkey/Redis OSS support both, so only Valkey/Redis OSS can survive a node failure without losing that node's data
- Memcached supports only simple string/object values; Valkey/Redis OSS add sorted sets, hashes, lists, and other data structures used directly for leaderboards, counters, and recommendation data
- Only Valkey/Redis OSS support pub/sub messaging (SUBSCRIBE/PUBLISH) — Memcached has no equivalent
- Memcached data partitions client-side across nodes by default; Valkey/Redis OSS (cluster mode enabled) partitions data server-side across shards with online resharding
- Engine choice is made at cluster creation and is not switchable in place — moving between engines means creating a new cluster and migrating data
Memcached vs Valkey/Redis OSS — deciding factors
- Memcached
- Simple string/object values only
- Multithreaded — scales cores within one node
- No replication, no automatic failover
- No pub/sub
- Valkey / Redis OSS
- Sorted sets, hashes, lists, geospatial data types
- Single-threaded per node — scale by adding shards
- Replication with automatic failover
- Pub/sub messaging built in
Signature
Memcached (simple, multithreaded, no failover) vs Valkey/Redis OSS (data structures, pub/sub, failover)
Memcached: simple values, multithreaded, no replication/failover, no pub/sub — pick it for pure object caching that scales out. Valkey/Redis OSS: data structures, pub/sub, replication with automatic failover — pick it when the workload needs any of those.