AWS › Amazon ElastiCache (Redis & Memcached)

What is the main difference between the Redis and Memcached engines in ElastiCache?

Beginner

Answer

Redis supports rich data structures like lists, sets, sorted sets, and hashes, along with features like persistence, replication, and pub or sub messaging, making it suitable for more complex use cases beyond simple caching, while Memcached is a simpler, multithreaded caching engine best suited for straightforward key value caching where you need to horizontally scale across many nodes with minimal overhead.
aws elasticache create-cache-cluster --cache-cluster-id my-cache --engine memcached --cache-node-type cache.t3.micro --num-cache-nodes 3
Real-world example A session storage system chooses Redis because it needs data persistence and replication for high availability, while a simple web page caching layer chooses Memcached for its straightforward, highly scalable key value model.

Common follow-ups: Does Memcached support data persistence like Redis does?;Which engine is better suited for storing complex data structures?