Redis and Memcached both keep data in memory to make applications faster. Memcached does one job simply; Redis is a broader in-memory data store that also works as a cache.

Choose Redis for most new projects, because it caches well and also offers data structures, persistence, replication, pub/sub and streams. Choose Memcached when you need a simple, multithreaded key-value cache for strings or serialized objects and want the fewest features to manage.
Memcached is a distributed memory caching system designed to sit in front of a database and store the results of expensive queries or page fragments. It stores keys and opaque values, evicts the least recently used items when memory fills, and spreads data across servers through client-side hashing. It has been in production at large websites for a very long time and does exactly what it promises.
Redis started as an in-memory key-value store and grew into a data structure server. Values can be strings, hashes, lists, sets, sorted sets, streams and more, each with atomic operations. Redis can persist data to disk, replicate to other nodes and run as a cluster. Its licensing has changed in recent years, which led to community forks such as Valkey; managed cloud services offer Redis-compatible engines either way.
Side by side
| Criterion | Redis | Memcached |
|---|---|---|
| Data model | Strings, hashes, lists, sets, sorted sets, streams, bitmaps and more. | Simple key-value pairs with opaque string values. |
| Persistence | Optional snapshots and append-only logs. | None; data is lost on restart by design. |
| Replication and failover | Built-in replicas, Sentinel and cluster mode. | Not built in; relies on clients or managed services. |
| Threading | Commands mostly execute on one main thread, with I/O threading options. | Multithreaded, so one node uses many CPU cores. |
| Scaling out | Redis Cluster shards data across nodes. | Clients hash keys across independent servers. |
| Eviction | Several configurable eviction policies. | Least recently used eviction with a slab memory allocator. |
| Messaging | Pub/sub and streams for queues and events. | None. |
| Scripting and atomic operations | Lua scripts, transactions and many atomic commands. | Basic atomic increment, decrement and compare-and-set. |
| Licensing | Licensing has changed over time; open source forks such as Valkey exist. | Permissive BSD license with a stable, simple history. |
| Operational complexity | More features to configure and secure. | Very little to configure. |
Decision guide

For basic caching, both work well. The application checks the cache, falls back to the database on a miss and writes the result back with an expiry. Memcached handles this pattern efficiently, and because it is multithreaded, a single large node can serve heavy traffic without sharding.
Redis earns its place when you need more. A sorted set makes a leaderboard trivial, a hash stores a user session field by field, atomic increments power rate limiting and streams support simple event pipelines. Teams often start with Redis for caching and find it absorbs several other jobs, which reduces the number of systems they run.
Memcached treats everything as disposable. If a node restarts, its data is gone and the application rebuilds the cache from the database. That is a feature for a pure cache, because there is no persistence to tune, but a cold cache after a restart can put sudden load on the database.
Redis can write snapshots, append every write to a log or both, and replicas can take over if the primary fails. This makes it suitable for data that is expensive to rebuild, such as sessions or counters. Even so, treat Redis as a fast secondary store rather than your only copy of critical business data, unless you have designed carefully for durability.
Both are extremely fast for their intended workloads, and network latency usually matters more than engine speed. Memcached scales vertically across cores and horizontally by adding servers that clients hash keys across. Adding or removing servers remaps some keys, which consistent hashing minimizes.
Redis scales out with cluster mode, which divides keys into slots across nodes and moves them during resharding. Because command execution is largely single-threaded, a very hot key can become a bottleneck, so key design matters. Managed services such as Amazon ElastiCache, Azure Cache and Google Memorystore handle much of this.
Whichever engine you choose, the harder problem is usually invalidation, not speed. Decide how each cached value expires or is cleared when the source data changes, protect the database from a stampede of misses when popular keys expire at once, and monitor hit rates so you know the cache is earning its keep.
Redis moved away from its original permissive license for a period, which prompted cloud providers and community members to create Valkey, a fork that continues under a permissive license. Redis has since added an open source license option again. For most teams using a managed service, this mainly affects which engine name appears in the console.
If you self-host or distribute software that bundles a cache, review the current license terms of whichever engine you choose. Memcached’s licensing has stayed simple throughout, which some organizations value for long-term planning.
How we help
We look at what you need to cache or store in memory, your tolerance for data loss and your hosting setup, then recommend Redis, Valkey, Memcached or no new cache at all. Our engineers design key schemes, expiry and invalidation rules, and set up monitoring and failover.
Fast, secure and accessible web applications built with React and Next.js, designed for real users and real traffic.
Explore serviceCloud architecture, migration and modernization on AWS and Azure, planned for reliability, security and controlled cost.
Explore serviceCI/CD pipelines, infrastructure as code, observability and automation that make releases frequent, safe and routine.
Explore serviceMulti-tenant SaaS products engineered for onboarding, billing, security and growth, from MVP to scale.
Explore serviceFAQ
For simple get and set operations, both are extremely fast and the difference rarely matters in practice. Memcached can use more CPU cores per node; Redis can reduce round trips with richer commands. Pick based on features, not raw speed.
It can for some workloads, such as session stores, counters or real-time features, especially with persistence and replication enabled. For core business records, a disk-based database with stronger durability guarantees is usually the safer system of record.
Valkey is an open source fork of Redis created after Redis changed its licensing. It is largely compatible with Redis clients and commands, and several cloud providers offer it as a managed engine.
No. Memcached keeps everything in memory and loses it on restart. That is intentional, since it is designed as a cache in front of a durable database.
Not always. Good indexing, query tuning and HTTP caching solve many performance problems without adding a system. Add a cache when you have measured a specific bottleneck it fixes, and plan how data will be invalidated when it changes.
Keep comparing
Talk it through with a solution architect. We’ll recommend the option that fits your constraints, even if it isn’t us.
