memcached and redis contrast

 

Memcached and redis on usage scenarios, summarized as follows:
Comparison between the two:

redis provide data persistence function, memcached no persistence.
redis data structure to be richer than memcached, matters other than to complete the scene;
a single key memcached limited 250B, value is limited to 1MB; the redis K, V are 512MB;
the memcached provides multiple data recovery based on the LRU algorithm, Redis recovery strategy, but recovered redis expiration policy can not rely on logic, it determines whether a key according to whether or not expired. But it may be determined according ttl has expired return value;

in conclusion:

KV common scenario: memcached, redis can. From this point of single function module, then we recommend memcached, cache only do one thing.
KV at length too large, complex data structures (such as the value of a piece of data taking), requires persistence case, the redis more suitable.

Original link: https: //blog.csdn.net/think2me/article/details/46869315

Guess you like

Origin www.cnblogs.com/isme-zjh/p/11935624.html