Databases

Redis vs Memcached

In-memory data stores compared: Redis with its rich data structures vs Memcached for pure caching performance.

262 views

R

Redis

In-memory data structure store used as database, cache, message broker, and streaming engine.

5/5
VS
M

Memcached

High-performance, distributed memory object caching system for simple key-value caching.

3/5

Feature Comparison

Feature Redis Memcached
Data Types Strings, Lists, Sets, Hashes, Sorted Sets, Streams Strings only
Persistence RDB snapshots + AOF None (volatile only)
Threading Single-threaded (I/O threads in 6.0+) Multi-threaded
Max Value Size 512MB 1MB (default)
Pub/Sub Yes No
Clustering Redis Cluster (built-in) Client-side sharding
Scripting Lua scripts None
Eviction Policies 8 policies LRU only

Redis

Best for: Applications needing caching plus data structures, pub/sub, sessions, and real-time features

Pricing: Free (RSAL license), Redis Cloud from $0/mo

Pros

  • + Rich data structures (lists, sets, hashes)
  • + Persistence options (RDB + AOF)
  • + Pub/Sub and Streams for messaging
  • + Lua scripting support
  • + Redis Cluster for horizontal scaling

Cons

  • - Single-threaded for commands
  • - Higher memory overhead per key
  • - More complex to configure
  • - Licensing changes (Redis Source Available)

Memcached

Best for: Pure caching scenarios where simplicity and raw throughput are top priorities

Pricing: Free, open-source (BSD)

Pros

  • + Multi-threaded (uses all CPU cores)
  • + Lower memory overhead per key
  • + Simpler to operate
  • + Predictable performance
  • + True open-source (BSD license)

Cons

  • - Only simple key-value storage
  • - No persistence (cache only)
  • - No built-in clustering
  • - Limited data type support
  • - No pub/sub or scripting

Community Vote

0 developers voted

50%
50%

Our Verdict

Redis is the clear winner for most modern applications, offering caching plus rich data structures, persistence, and messaging. Memcached still has a place for pure caching workloads where multi-threaded performance and simplicity matter. Unless you specifically need only simple key-value caching, Redis is the better default choice.