Quick verdict
Redis is an in-memory data store with rich data structures, optional persistence, replication and features such as pub/sub, streams and atomic operations, used for caching, sessions, queues, leaderboards and more. Memcached is a simple, multithreaded in-memory key-value cache focused purely on fast caching. Choose Redis for versatility; choose Memcached for straightforward, large-scale caching of simple values.
Redis started as a cache but grew into a general-purpose data structure server. It supports strings, hashes, lists, sets, sorted sets, streams and more, can persist data to disk, and replicates for high availability. Licensing changes to Redis led to the Valkey fork, a Linux Foundation project that many cloud providers now offer, which is worth considering alongside Redis itself. Redis 8 has since added AGPLv3 as an open-source license option.
Redis vs Memcached, side by side
| Criterion | Redis | Memcached |
|---|---|---|
| Data model | Strings, hashes, lists, sets, sorted sets, streams and more | Simple key-value strings |
| Persistence | Optional snapshots and append-only file | None; data lost on restart |
| Replication and failover | Built-in replicas, Sentinel and Cluster | Not built in; handled by clients or proxies |
| Threading | Mostly single-threaded command execution, with I/O threads | Multithreaded, scales across cores |
| Extra features | Pub/sub, Lua scripting, transactions, geospatial, TTLs | Basic get, set, increment and expiry |
| Memory efficiency | Good; overhead varies by data structure | Very efficient for simple cached values |
| Use beyond caching | Sessions, queues, rate limits, leaderboards, locks | Caching only |
| Licensing | Source-available or AGPLv3 since Redis 8; Valkey is a permissively licensed fork | Open source under a permissive license |
| Managed options | ElastiCache, MemoryStore, Azure Cache, Redis Cloud | ElastiCache, MemoryStore and others |
| Best fit | Versatile caching plus data structures and messaging | Large, simple caches with horizontal scaling |
Choose Redis when
- You need more than caching, such as sessions, rate limiting, queues or leaderboards.
- Cached data should survive restarts or be replicated for high availability.
- You want atomic operations on structures like counters, sets and sorted sets.
- You need pub/sub or streams for lightweight messaging.
- Your team wants one in-memory tool for several jobs.
Choose Memcached when
- You need a simple, very large cache of HTML fragments, query results or objects.
- Losing cached data on restart is acceptable because the database is the source of truth.
- You want multithreaded performance on large machines with minimal configuration.
- You prefer a minimal tool with a permissive open-source license.
Performance in practice
Both deliver sub-millisecond responses for typical cache operations, and in most applications network latency and serialization matter more than server speed. Memcached's multithreading lets one large node use many CPU cores, which can help with very high request rates for simple gets and sets. Redis executes commands mostly on one thread per instance, so it scales by running more shards in Redis Cluster, with I/O threading available to improve network throughput.
Redis's data structures often reduce network round trips, for example by updating a leaderboard atomically instead of reading, modifying and writing a value from application code. Choosing the right structure for each use case, such as hashes for objects or sorted sets for rankings, usually matters more than the choice of server.
Choosing in modern architectures
Redis, or its fork Valkey, has become the default in-memory store for many teams because one system covers caching, sessions, rate limiting and simple queues, and managed services make high availability easy. Memcached remains a strong, efficient option for pure caching at large scale, especially in organizations that already run it well. Check current licensing terms for your deployment model when choosing between Redis and Valkey. Nexzem configures caching layers as part of backend performance work, selecting the store by workload.
Final verdict
Choose Redis, or the Valkey fork, when you want a versatile in-memory store that handles caching plus sessions, counters, queues, pub/sub and persistence, with built-in replication. Choose Memcached when you need a simple, multithreaded cache for large volumes of straightforward values and do not need persistence or advanced data types. For most new applications, Redis or Valkey is the more flexible default.