1. Data structure
Memccached only supports key-value types
The Reids supports String hash list set SortedSet, which are internally represented by Reidsobject.
2. Memory Management
Memcached uses the slab allocation mechanism, which divides the memory into blocks of different sizes, which in turn will put data into the appropriate size blocks, effectively reducing memory fragmentation, but will cause some memory waste.
Redis just encapsulates the original mallc/free operation.
Redis will put all the keys into memory, if the memory is not enough to swap part of the value to disk, of course, will also try to clean up some unused data (LRU algorithm).
3. Persistence
Memcached does not support persistence
Redis supports AOF and RDB
4. Cluster Management
Memcached does not support distributed, so it needs to be implemented by the client.
In addition to the client's own implementation, Redis also provides redis cluster to support distributed storage.
Some differences between Redis and Memcached