Overview
Pick Redis or Valkey for new caches; keep Memcached only where a simple, multi-threaded key-value cache is all you need and you already operate it. The licensing picture changed: Redis 7.2 and earlier are BSD-3; Redis 7.4 is RSALv2 or SSPLv1; Redis 8 adds AGPLv3 (OSI-approved) as a third option. Valkey, the Linux Foundation fork, is BSD-3 and at 9.1 (2026-05-19). Memcached is at 1.6.45 (2026-07-09). Amazon ElastiCache offers Valkey, Redis OSS, and Memcached.
Comparison
| Dimension | Redis 8 / Valkey 9 | Memcached 1.6 |
|---|---|---|
| Data model | Strings, hashes, lists, sets, sorted sets, streams | Key to blob values |
| Persistence | RDB snapshots and AOF | None; restart empties the cache |
| Messaging | Pub/sub and Streams with consumer groups | None |
| Atomic logic | Transactions and Lua scripting | cas and counters |
| Clustering | Server-side Redis Cluster / Valkey cluster | Client-side sharding |
| Threads | Command loop plus I/O threads | Multi-threaded |
| License | Redis 8: RSALv2, SSPLv1, or AGPLv3; Valkey: BSD-3 | BSD |
| Managed | ElastiCache (Valkey, Redis OSS), Redis Cloud, Upstash | ElastiCache |
Pick Redis or Valkey when
Pick one of them for almost every new service.
- Sessions with TTL, rate limiting with
INCRandEXPIRE, idempotency keys, and locks withSET key value NX PX. - Leaderboards and rankings with sorted sets; queues and event logs with Streams.
- Data you want to survive a restart, or replicate to a standby.
- License fit: use Valkey or Redis 7.2 and earlier for permissive BSD terms; use Redis 8 under AGPLv3 only if your legal team accepts its network-use clause. RSALv2 and SSPLv1 restrict offering the software as a managed service.
Pick Memcached when
Pick Memcached for narrow, plain caching.
- Only
get,set,delete, andcason opaque values, with no durability. - An existing Memcached fleet that works; replace it when a feature needs Redis semantics.
- Strongly multi-threaded access to one cache node is the bottleneck you measured.
Migrate
Memcached to Redis or Valkey: swap the client library and let the cache warm; no data migrates because Memcached holds no durable state. Run both during a soak period and compare hit rates. Redis to Memcached means flattening every structure to serialized values and dropping scripts, persistence, and pub/sub; do it only for a measured memory or cost reason. For durable key-value storage at scale on AWS, compare dynamodb-vs-postgres.
FAQ
Should I use Redis or Memcached for a new cache?
Use Redis or Valkey for almost every new service, since they add data structures, persistence, pub/sub, and Streams. Keep Memcached only for a plain multi-threaded key-value cache you already operate.
Is Redis still open source?
Redis 8 adds AGPLv3, an OSI-approved license, alongside RSALv2 and SSPLv1; Redis 7.4 is RSALv2 or SSPLv1 only, and Redis 7.2 and earlier are BSD-3. For permissive BSD terms, use Valkey or Redis 7.2 and earlier.
What is Valkey and should I use it instead of Redis?
Valkey is the Linux Foundation fork of Redis, licensed BSD-3 and at 9.1 (2026-05-19). Use it when you want Redis semantics under permissive terms; ElastiCache offers it alongside Redis OSS and Memcached.
Is Memcached faster than Redis?
Memcached is multi-threaded, so pick it only when multi-threaded access to one cache node is a bottleneck you measured. Redis runs a command loop plus I/O threads and covers far more use cases.