The biggest difference between redis Cache Technology and memcache Technology

Source: Internet
Author: User
1. What is redis?
Redis is a key-value storage system. Similar to memcached, memcached supports many other value types, including string, list, set, and zset ). These data types support push/pop, Add/Remove, Intersection Set and difference set, and more abundant operations, and these operations are atomic. On this basis, redis supports sorting in different ways. Like memcached, data is cached in the memory to ensure efficiency. The difference is that redis periodically writes the updated data to the disk or writes the change operation to the append record file, and on this basis implements master-slave (master-slave) synchronization.
2. What is the performance?
Redis is a high-performance Key-value memory database. Official Performance Benchmark Test Results: Set operations are performed 110000 times per second, and get operations are performed 81000 times per second.
3. Objects cannot be stored.
Similar to memcached, memcached supports many other value types, including string, list, set, and zset ). These data types support push/pop, Add/Remove, intersection union and difference sets, and richer operations.
4. maximum difference between redis and memcache
Replication (tree)
Data Types (string, lists, sorted sets, hashes) persistence (snapshot, aof)
Many developers think that redis cannot be faster than memcached. memcached is fully memory-based, while redis has the persistence storage feature. Even asynchronous redis cannot be faster than memcached. However, the benchmark test result is basically the absolute advantage of redis. I have been thinking about this reason. The reasons for this are as follows.
Libevent. Unlike memcached, redis does not select libevent. Libevent creates huge code to cater to versatility (redis code is less than 1/3 of libevent's code at the moment) and sacrifices a lot of performance on specific platforms. Redis uses two file changes in libevent to implement its own epoll event loop (4 ). Many developers in the industry also recommend redis

The biggest difference between redis Cache Technology and memcache Technology

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.