King of efficient cache

A good memory is not as good as a bad pen. If you can jot down something, just jot it down. If you have time to take it out, you will find a different feeling.

table of Contents

Horizontal comparison

Summary:

Memory comparison

Performance comparison


Both Redis and Couchbase are memory-based data storage systems. Couchbase is a high-performance, highly scalable and highly available distributed cache system; Redis is an open source memory data structure storage system.

Horizontal comparison

category COUCHBASE REDIS
category NoSQL NoSQL
website www.couchbase.com redis.IO
license GFDL Apache License 2 Couchbase Corporation Enterprise License Agreement: Free Couchbase Corporation Community Edition License Agreement BSD license
design
Database model Key-value modeless document-oriented NoSQL Key-value modeless publish/subscribe
data storage Volatile memory file system Volatile memory file system
Embed no no
Features
Query language memcached protocol Lua API calls
type of data JSON data structure
Conditional item update Yes Yes
MAP and REDUCE Yes no
UNICODE Yes Yes
TTL Yes Yes
compression Yes Yes
Completeness
Integrity demonstration MVCC
atom Yes Yes
consistency Yes Yes
isolation Yes Yes
Durability (data storage) Yes Yes
transaction no Yes
Referential integrity no no
version control Yes no
Lock mode Optimistic lock pessimistic lock Lock Free Model
index
Secondary index Yes no
Key combination Yes no
research all Yes no
Geospatial index Yes
Graph support no no
distribution
Horizontal scalability Yes Yes
copy Yes Yes
Copy mode Multi-master replication Master-slave replication
Fragmentation Yes no
Shared nothing architecture Yes Yes
limit
The size of the value is the largest. 20 MB 512 MB
System Requirements
operating system Ubuntu

 

red hat

windows

Mac OS X

Linux

 

* NIX

windows

Mac OS X

Native driver Beanshell
PHP
Perl
C#
Ruby
Go
JavaScript
C++
Java
Python
Erlang
C
Actionscript 3.0
C#
C++
Clojure
Common Lisp
D Lang
Dart
Erlang
Fancy
Go
Haskell
Haxe
io
Java
JavaScript
Lua
Objective-C
Perl
PHP
Pure Data
Python
Ruby
Scala
Scheme
Smalltalk
Tcl
最低内存 2 MB
架构
程序设计语言 C
C++
Erlang
Ç
更多
描述 非常灵活的高性能key-value/document存储,但相当慢,支持索引。 在内存中的数据结构存储
多用户系统 是的 是的
软件分发 软件包管理系统 压缩包软件包管理系统
对象 – 关系映射(ORM) 是的 是的
文档级 ★★★★★ ★★★★★
REST风格
分布式计数器 是的
免费使用 有条件的 是的
活跃 是的 是的
数据库连接池 是的 是的
实时分析 是的 是的
社区主导型 基本的
WSDL
WEB界面 是的
在线备份 是的
基于功能的索引
密钥长度最大 250
登录 是的 是的
实施的灵活性 (67%的全球投票) (50%的全球投票)
下载 www.couchbase.com /download redis.IO /download
备份功能 基本的
查询缓存
易于使用 ★★★★☆ ★★★★★
就地更新 是的
免费用于商业用途 是的 是的
排序 是的 是的
皑皑的收藏 是的
可调的担忧写 是的 是的
阅读喜好 无✏
运算/秒 160 000
JSON 是的 是的
灵活的表(架构) 是的
重降低 是的
代码行 30 K时
事件驱动架构 是的
管道汇聚 是的
弹簧数据支持 是的
类型 COUCHBASE REDIS的

概括

       Redis 相比 Couchbase 来说,拥有更多的数据结构和并支持更丰富的数据操作,通常在 Couchbase 里,你需要将数据拿到客户端来进行类似的修改再 set 回去(你需要先先通过 get 方法从服务器读取数据文档,并将文档反序列化为 json 对象,之后修改 json 对象对应属性,再通过 set 方法将数据写入服务器,序列化后进行存储)。这大大增加了网络 IO 的次数和传输中的数据体积。在 Redis 中,这些复杂的操作通常和一般的 GET/SET 一样高效。

内存比较


使用简单的 key-value 存储的话,Couchbase 的内存利用率更高,而 Redis 采用 hash 结构来做 key-value 存储,由于其组合式的压缩,其内存利用率会高于 Couchbase。所以,如果需要缓存能够支持更复杂的数据结构和更频繁数据的部分更新操作,那么 Redis 会是不错的选择。

性能对比

由于 Redis 只使用单核,而 Couchbase 可以使用多核,所以平均每一个核上 Redis 在存储小数据时比 Couchbase 性能更高。而在 100k 以上的数据中,Couchbase 性能要高于 Redis,虽然 Redis 最近也在存储大数据的性能上进行优化,但是比起 Couchbase,还是稍有逊色。

至于其他(数据类型,效率,集群,分布式等的信息,可以去官网看),可去官网一探究竟!
redis: https://redis.io/     http://www.redis.cn/
couchbase : https://www.couchbase.com/ 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin blog.csdn.net/supingemail/article/details/112802688