Redis and Memcache comparison and selection (reproduced)

Source: Internet
Author: User
Tags memcached

Original address: http://blog.csdn.net/sunmenggmail/article/details/36176029

 There is no need to pay too much attention to performance. because Redisonly single cores are used, andMemcachedMulti-core can be used , so on the comparison, on average each core Redis compared to 100k memcached performance is higher than redis redis is also recently storing Big Data for performance optimizations, but memcached

     You need to focus on memory utilization. For key-value Such simple data storage, The memory utilization of span style= "Font-family:verdana" >memcache hash font-family structure Font-family:verdana ">redis

     You need to focus on redis redis

     You should be concerned about the actions you need. redis supports a lot of complex operations, even considering only memory usage, You can often do a lot in a single operation without having to read the data to the client (this will require a lot of io operation). These complex operations are basically the same as pure get post operation as fast, so you don't just need get/set But more action, redis

for the choice of the two is to see the specific application scenario, if you need to cache the data is only key-value Such a simple structure, I am in the project or the use of memcache , it is also stable and reliable enough. If you are involved in a series of complex operations such as storage, sorting, and so on, Redis is no doubt chosen .

As for the differences between Redis and memcache , here are some relevant statements for recording:

Redis and the Memecache the difference is [2] :

1, storage mode:
Memecacheall the data in memory, will be hung up after the power outage, the data can not exceed the memory size
RedisSome exist on the hard disk, this can guarantee the persistence of data, support the persistence of data ( author Note: There are snapshots and AOF Log two persistent ways, in the actual application, pay special attention to the configuration file snapshot parameters, or it is likely that the server is frequently loaded dump ).
    2 , data support type:
    Redis compared to data support memecache much more.
    

Personal summary, with persistent requirements or applications with advanced requirements for data structure and processing, choose Redis, other simple key/value storage, select memcache .

Redis and Memcache comparison and selection (reproduced)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.