1. Redis in , Not all data is always stored in memory , This is the Memcached The biggest difference .

2. Redis It's not just about supporting simple k/v Data of type , It also provides list,set,hash Such as data structure storage . Memcached Based on a storage key / Value pairs hashmap

3. Redis Support data backup , namely master-slave Mode data backup .

4. Redis Support data persistence , Data in memory can be kept on disk , When you restart, you can load it again for use .

Conclusion 1 :

memcache The official definition of Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.

redis The official definition of Redis is an open source, BSD licensed, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets. The copyright is the same They're all used bsd agreement , The projects that use it can be used by business users , You don't have to publish the code for the second modification , You can modify the source code .

data type redis Rich data types , Support set liset Other types memcache Support for simple data types , Complex objects need to be handled by the client itself persistence redis Support data landing and persistent storage memcache Data persistence is not supported Distributed storage redis Support master-slave Copying model memcache Consistency can be used hash Do distributed value Different sizes memcache It's a memory cache ,key The length of is less than 250 character , Single item Storage should be smaller than 1M, Not suitable for virtual machines Data consistency is different redis Using a single threaded model , Ensure that the data is submitted in order .

memcache Need to use cas Ensure data consistency .CAS(Check and Set) Is a mechanism to ensure concurrency consistency , Belong to “ Optimism lock ” Category ; The principle is simple : Take the version number , operation , Compare version number , If it's consistent, operate , Don't do anything if it's inconsistent cpu utilize redis The single threaded model can only use one cpu, Can open multiple redis process .

Conclusion 2 :

1.Redis in , Not all data is always stored in memory , This is the Memcached The biggest difference .

2.Redis It's not just about supporting simple k/v Data of type , It also provides list,set,hash Such as data structure storage .

3.Redis Support data backup , namely master-slave Mode data backup .

4.Redis Support data persistence , Data in memory can be kept on disk , When you restart, you can load it again for use . I personally think the most fundamental difference is Redis In many ways with the characteristics of the database , Or a database system , and Memcached It's just simple K/V cache

Summary 3 : redis and memecache The difference is :

1、 storage : memecache Store all the data in memory , It hangs when the power goes out , Data cannot exceed memory size redis Some of it is stored on the hard drive , This ensures data persistence .

2、 Data support type : redis In terms of data support, it is better than memecache Many, many .

3、 Using the underlying model is different : The new version of the redis Build it yourself VM Mechanism , Because the normal system calls system functions , It's a waste of time moving and requesting .

Redis and Memcache More related articles on the difference analysis of

  1. turn :Redis and Memcache Difference analysis of

    Redis and Memcache Difference analysis of   Link to the original text :http://blog.csdn.net/u013474436/article/details/48632665 Simple distinction : 1. Redis in , and ...

  2. Redis and Memcache Difference analysis of [ turn ]

    1. Redis in , Not all data is always stored in memory , This is the Memcached The biggest difference . 2. Redis It's not just about supporting simple k/v Data of type , It also provides list,set,hash And so on ...

  3. Redis And Memcache The difference between

    Redis And Memcache The difference between data type :  redis Rich data types , Support set liset Other types           memcache Support for simple data types , Complex objects need to be handled by the client itself persistence : red ...

  4. Redis and Memcache The difference between

    Redis and Memcache The difference between Conclusion 1 : 1. data type redis Rich data types , Support set liset Other types memcache Support for simple data types , Complex objects need to be handled by the client itself 2. persistence redis the ...

  5. Redis and Memcache Summary of the differences - Jingdong Ali interview

    colony : redis and memcached All support clusters data type Redis The data types supported are much richer ,Redis It's not just about supporting simple k/v Data of type , It also provides String,List,Set,Hash,Sor ...

  6. redis and memcache The difference between ( summary )

    1.Redis and Memcache It's all about storing data in memory , It's all memory databases . however memcache It can also be used to cache other things , For example, pictures . Video and so on : 2.Redis It's not just about supporting simple k/v Data of type , It also provides lis ...

  7. redis And memcache The difference between 2

    Conclusion 1 : memcache The official definition of Free & open source, high-performance, distributed memory object caching system ...

  8. Redis brief introduction & And Memcache The difference between

    redis Is a memory based high performance key-value database .   Reids Characteristics Redis It's essentially a Key-Value Type of in-memory database , It's like memcached, The entire database is loaded in memory for operation ...

  9. Redis and Memcache What's the difference

    Redis and Memcache It's all memory databases , But there's a difference between them , follow ytkah have a look Redis and Memcache The difference between! Redis Support multiple data structures , Such as string,list,dict,set,z ...

Random recommendation

  1. jQuery Animation slideUp() Cause of abnormal displacement

    use jQuery Write a list . When you click the bottom button , The number in the list exceeds 6 The items can be pulled down or folded up . use slideUp(), Meet a problem . Expanding a list item produces an abnormal displacement , As shown in the figure below . The end of the animation shifts . This question appears ...

  2. About linux curl The problem of address parameter

    for example  url by http://mywebsite.com/index.PHP?a=1&b=2&c=3web Visit in the form of url Address , Use $_GET You can get all the parameters, but in Linux Next ...

  3. codeforces #268 div2 D

    For this problem, the first feeling is that graph theory is related, and then we first analyze , hypothesis a[i] stay A The elements needed for a collection are a[x], stay B A set is a[y] So suppose a[i] stay A aggregate , That's inevitable a[x] It must be in A aggregate , because a[y] If in B A set has no corresponding elements , ...

  4. HDU 4280 Island Transport( Network flow )

    Reprint please indicate the source :http://blog.csdn.net/u012860063 Topic link :pid=4280">http://acm.hdu.edu.cn/showproblem.php ...

  5. Axis2 establish WebService Server interface +SoupUI as well as Client End demo Test call

    First step : introduce axis2 relevant jar package , If it is pom project , Directly in pom Just introduce dependency into the file <dependency> <groupId>org.apache.axis2</gr ...

  6. selenium3+python3.6 Crawling page source code

    from selenium import webdriver import unittest,time class my_test(unittest.TestCase): def setUp(self ...

  7. Built in module datetime Use

    #-*- coding:utf-8 -*- from datetime import datetime # Get the current date and time now =datetime.now() print now # 2017- ...

  8. C# Development will be

    1. String properties and methods : 2. Array of various familiar and methods : 3.public.private.protect.internal.protect internal 4. Constructors 5. attribute 6.ADO.NE ...

  9. arcpy Import error problem “ImportError: No module named arcpy”

    If you also make a mistake as shown in the figure below , The method in this paper may be able to solve the problem First , Open you up python Installation position of , The path shown below , find desktop10.3.pth file , Open view , Will you arcgis The relevant path of , common 3 Absolutely ...

  10. wx Small program to get user location information

    wx The built-in interface of the applet can only get the user's coordinates , Get the user's address through wechat location service : http://lbs.qq.com/qqmap_wx_jssdk/index.html notes : Need to be in key Open in the settings of webSer ...