Compare Redis OSS and Memcached
Choosing between Redis OSS and Memcached
The most important difference is Memcached is fully open source (BSD licensing) while Redis OSS 7.2 is the last fully open source version of Redis. As of March 2025, Redis 8.0 is licensed under AGPLv3, which for many organizations is unviable due to its copyleft provision that requires any code changes to be contributed back to Redis. Many organizations strictly forbit the adoption of software licensed under AGPLv3 due to its legal and commercial risks.
If both BSD and AGPLv3 licensing are suitable options for your use case, the table below summarizes key differences in the features offered by Memcached and Redis OSS engines. While both engines are in-memory, key-value caches, they have significant differences beyond licensing.
Memcached is ideal if you need to operate the simplest model, run large nodes with multiple cores or threads, scale out and in by adding and removing nodes based on workload demands, and/or cache objects. Assuming you can abide by Redis licensing requirements, Redis offers a wide variety of features by version. If AGPLv3 licensing is too restrictive, you should look at Valkey which is the most permissive open source in-memory, key-value cache.
Redis OSS vs. Memcached
Comparison by key feature
Feature
|
Redis OSS
|
Memcached
|
---|---|---|
Sub-millisecond latency
|
Yes
|
Yes
|
Developer ease of use
|
Yes
|
Yes
|
Data partitioning
|
Yes
|
Yes
|
Support for a broad set of programming languages
|
Yes
|
Yes
|
Advanced data structures
|
Yes |
- |
Multithreaded architecture
|
- |
Yes |
Snapshots
|
Yes |
- |
Replication
|
Yes |
- |
Transactions
|
Yes |
- |
Pub/Sub
|
Yes |
- |
Lua scripting
|
Yes |
- |
Geospatial support
|
Yes |
- |
Page topics
General
Open allMicrosecond latency
Both Redis OSS and Memcached support microsecond latency. By storing data in-memory they can read data more quickly than disk-based databases.
Developer ease of use
Both Redis OSS and Memcached are syntactically easy to use and require a minimal amount of code to integrate into your application.
Data partitioning
Both Redis OSS and Memcached allow you to distribute your data among multiple nodes. This allows you to scale out to better handle more data when demand grows.
Support for a broad set of programming languages
Both Redis OSS and Memcached have many open-source clients available for developers. Supported languages include Java, Python, PHP, C, C++, C#, JavaScript, Node.js, Ruby, Go and many others.
Advanced data structures
In addition to strings, Redis OSS supports lists, sets, sorted sets, hashes, bit arrays, and hyperloglogs. Applications can use these more advanced data structures to support a variety of use cases. For example, you can use Redis OSS sorted sets to easily implement a game leaderboard that keeps a list of players sorted by their rank.
Multithreaded architecture
Since Memcached is multithreaded, it can make use of multiple processing cores. This means that you can handle more operations by scaling up compute capacity.
Snapshots
With Redis OSS, you can keep your data on disk with a point in time snapshot which can be used for archiving or recovery.
Replication
Redis OSS lets you create multiple replicas of a primary. This allows you to scale database reads and to have highly available clusters.
Transactions
Redis OSS supports transactions which let you execute a group of commands as an isolated and atomic operation.
Pub/Sub
Redis OSS supports Pub/Sub messaging with pattern matching which you can use for high performance chat rooms, real-time comment streams, social media feeds, and server intercommunication.
Lua scripting
Redis OSS allows you to execute transactional Lua scripts. Scripts can help you boost performance and simplify your application.
Geospatial support
Redis OSS has purpose-built commands for working with real-time geospatial data at scale. You can perform operations like finding the distance between two elements (for example people or places) and finding all elements within a given distance of a point.
How AWS can support your requirements
AWS offers Amazon ElastiCache, a serverless, fully managed caching service with full Redis OSS and Memcached compatibility. With ElastiCache, it is effortless to get started, operate, and scale caching workloads in the cloud. This is why hundreds of thousands of customers use ElastiCache to boost the performance of their databases and applications, achieve higher scale, and optimize their cost. With ElastiCache, you access the following capabilities while avoiding lock-in with open source software:
- Serverless lets you get started in under a minute and removes any need to plan, provision, and manage capacity.
- Fully managed removes undifferentiated caching management tasks such as hardware provisioning, software patching, setup, configuration, and failure recovery.
- Native integrations with other AWS services such as Amazon CloudWatch and Amazon CloudTrail provides monitoring, observability, auditability, and governance over your caches.
- Excellence in the fundamentals of price performance, reliability, security, and operational excellence that are synonymous with AWS.