Menu
Amazon ElastiCache
User Guide (API Version 2015-02-02)

Choosing an Engine: Memcached, Redis (cluster mode disabled), or Redis (cluster mode enabled)

On the surface, the engines look similar. Each of them is an in-memory key/value store. However, in practice there are significant differences.

Choose Memcached if the following apply to your situation:

  • You need the simplest model possible.

  • You need to run large nodes with multiple cores or threads.

  • You need the ability to scale out/in, adding and removing nodes as demand on your system increases and decreases.

  • You need to partition your data across multiple shards.

  • You need to cache objects, such as a database.

Choose Redis 2.8.x or Redis 3.2 (non-clustered mode) if the following apply to your situation:

  • You need complex data types, such as strings, hashes, lists, sets, sorted sets, and bitmaps.

  • You need to sort or rank in-memory data-sets.

  • You need persistence of your key store.

  • You need to replicate your data from the primary to one or more read replicas for read intensive applications.

  • You need automatic failover if your primary node fails.

  • You need publish and subscribe (pub/sub) capabilities—to inform clients about events on the server.

  • You need backup and restore capabilities.

  • You need to support multiple databases.

Choose Redis 3.2 (clustered mode) if you require all the functionality of Redis 2.8.x with the following differences:

  • You need to partition your data across 2 to 15 node groups (cluster mode only).

  • You need geospatial indexing (clustered mode or non-clustered mode).

  • You do not need to support multiple databases.

Important

Redis (cluster mode enabled) cluster mode has the following limitations:

  • No scale up to larger node types.

  • No changing the number of node groups (partitions).

  • No changing the number of replicas in a node group (partition).

Comparison summary of Memcached, Redis (cluster mode disabled), and Redis (cluster mode enabled)

Memcached Redis (cluster mode disabled) Redis (cluster mode enabled)
Engine versions 1.4.x 2.8.x & 3.2.x 3.2.x
Data types Simple ‡ Redis 2.8.x - Complex * Complex †
Redis 3.2.x - Complex †
Multi-threaded Yes No No
Cluster is modifiable Yes Yes No
Node type upgrade No Yes No
Engine upgrading Yes Yes No
Data partitioning Yes No Yes
Persistence of key store No Yes Yes
High availability (Replication) No Yes Yes
Automatic Failover of Primary No Optional Required
Pub/Sub capabilities No Yes Yes
Sorted lists No Yes Yes
Counters & hashes No Yes Yes
Backup/Restore capabilities No Yes Yes
Geospatial indexing No Redis 2.8.x - No Yes
Redis 3.2.x - Yes
Notes:
‡ string, objects (like databases)
* string, sets, sorted sets, lists, hashes, bitmaps, hyperloglog
† string, sets, sorted sets, lists, hashes, bitmaps, hyperloglog, geospacial indexes

After you choose the engine for your cluster, we recommend that you use the most recent version of that engine. For more information see Comparing Memcached Versions or Comparing Redis Versions.