ElastiCache Redis vs Memcached
When to use Redis versus Memcached for distributed caching on AWS.
Overview
What is being compared
Redis and Memcached are both in-memory data stores offered as managed services through ElastiCache. Redis has become the default for most use cases because it adds capabilities at comparable performance. The table below sums up where the two engines part ways.
- Data model — Rich data structures — Simple key-value
- Persistence — Yes — No
- Replication — Yes — No
- Pub/sub — Yes — No
- Threading — Single-threaded command execution — Multi-threaded
- Scaling strength — Features at comparable performance — Pure horizontal scaling
- Fits — Sessions, leaderboards, rate limiting, pub/sub, geospatial queries, a cache that survives restarts — Stateless caching with very simple key-value access across many nodes
Read the rows as one story. Redis keeps its data, copies it to replicas and offers structures such as sorted sets and pub/sub, so it fits work where the cache holds state. Memcached does none of that, and its strength is spreading plain key-value caching across many multi-threaded nodes.
Sign up free to read the full topic
More Comparisons topics
Start free on Cariara · Coding problems · System design studio