A summary of the differences between Redis and Memcache

Source: Internet
Author: User
Tags cas memcached

Data TypeA wide range of Redis data types, support for type memcache such as set Liset, support simple data types, require clients to handle complex object persistence Redis support data on-ground persistent storage memcache does not support data persistence storage Distributed storage Redis supports Master-slave replication mode memcache can use consistent hash to do distributed value size different memcache is a memory cache, key is less than 250 characters in length, a single item store is less than 1M, Not suitable for virtual machines using data consistency different Redis uses a single-threaded model, guaranteeing that the data is submitted sequentially. Memcache need to use CAS to ensure data consistency. CAS (Check and Set) is a mechanism for ensuring concurrency consistency and belongs to the "optimistic lock" category; The principle is simple: take the version number, operation, contrast version number, if the same operation, inconsistent on the abandonment of any operation CPU using the Redis single-threaded model can only use one CPU, You can turn on multiple Redis processes summary two: 1. In Redis, not all data is stored in memory all the time, which is the biggest difference compared to memcached. 2.Redis not only supports simple k/v types of data, but also provides storage of data structures such as List,set,hash. 3.Redis backup of supporting data, i.e. Master-slave mode data backup. 4.Redis support data persistence, you can keep the in-memory data on the disk, restart the time can be loaded again for use. I personally think that the most fundamental difference is that Redis has a database feature in many ways, or a database system, and memcached is simply a k/v cache

Reference: Summary of differences between Redis and Memcache

A summary of the differences between Redis and Memcache

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.