Memcached vs Valkey
Memcached: The original multi-threaded, dead-simple distributed memory cache for key-value blobs. Valkey: The Linux Foundation's BSD-licensed fork of Redis, now the default engine on AWS and Google Cloud.
key differences
- Memcached is built for larger datasets (≤ 1 PB) than Valkey (≤ 10 TB).
- Horizontal scaling is manual in Memcached and native in Valkey.
- Transactions: Memcached offers none ACID; Valkey offers limited.
- Only Valkey has transactions, geospatial, stored procedures, pub/sub, durable persistence.
choose memcached for
- +Read-through caching of database query results
- +Rendered page and fragment caching
- +Session storage when losing sessions is acceptable
- +Very large, horizontally sharded look-aside cache tiers
best at · Cache, Sessions
choose valkey for
- +Replacing Redis OSS without license concerns
- +Application caching and session storage
- +Rate limiting, counters and leaderboards
- +Pub/sub fan-out and Streams-based queues
best at · Cache, Sessions, Queue
Memcached vs Valkey: FAQ
What is the difference between Memcached and Valkey?
Memcached: The original multi-threaded, dead-simple distributed memory cache for key-value blobs. Valkey: The Linux Foundation's BSD-licensed fork of Redis, now the default engine on AWS and Google Cloud. Memcached is built for larger datasets (≤ 1 PB) than Valkey (≤ 10 TB). Horizontal scaling is manual in Memcached and native in Valkey. Transactions: Memcached offers none ACID; Valkey offers limited.
When should I choose Memcached over Valkey?
Choose Memcached for read-through caching of database query results; rendered page and fragment caching; and session storage when losing sessions is acceptable. Choose Valkey for replacing Redis OSS without license concerns; application caching and session storage; and rate limiting, counters and leaderboards.
Is Memcached or Valkey more popular?
Valkey ranks #16 on the WhichDB Score (58.0/100) and Memcached ranks #25 (50.6/100). Popularity is not fit: check the requirements that matter for your project.
Are Memcached and Valkey open source?
Yes. Memcached is open source. License: BSD 3-Clause. Yes. Valkey is open source. License: BSD 3-Clause.