01. Couchbase简介-CouchBase从0到50
1.CouchBase是什么
简单来说CouchBase是一款开源的,分布式的nosql数据库,主要用于分布式缓存和数据存储领域。能够通过manage cache提供快速的亚毫米级别的k-v存储操作,并且提供快速的查询和其功能强大的能够指定SQL-like查询的查询引擎。
2.CouchBase的特点
CouchBase是在memcached和redis之类缓存组件的基础上发展而来的,被称作为可能是最好的缓存系统。所其必然能满足之前的前辈所满足不了的地方。
传统的缓存组件包括memcached和redis有着这种或者那种的缺点:
- Cluster支持完善度不够或者直接没有Cluster
- 没有良好的高可用性机制,持久化支持的亦不是很完善
- 扩容和故障恢复能操作维护复杂
- 其他
而CouchBase则对上面的一些缺点都有着良好的支持。或者说
CouchBase所提供的任何单一功能,在市面上基本上都能找到一款数据库能够满足。但是这些数据库实际使用的话总是会有各种各样的妥协,性能很好的话,扩展性可能很差之类的。而CouchBase的目标就是建立一个大一统,各种功能都包含可用,所谓接近完美的数据库。
3.CouchBase版本
CouchBase的官网地址如下:
注意:国内部分区域可能由于众所众知的原因无法打开或者打开卡顿。
截止到本文时,CouchBase的最新版本为2018.10月份发布的6.0.0版本。
CouchBase产品众多,二大产产品线Server和Mobile,至于Cloud和Kubernetes则主要是运行的不同平台,每个产品线又区分企业版和社区版两个不同的版本。
本系列主要讲解的是Server产品线的企业版本。
注意:版本限定非常重要,如果没有特殊说明的话,本系列讲解的都是依赖于Server Enterprise 6.0.0版本
具体Enterprise和Community版本对比如下
Data access
|
Community Edition | Enterprise Edition |
Key-value interface (read/write) | ![]() |
![]() |
N1QL (SQL-based queries) | ![]() |
![]() |
N1QL for Analytics (SQL++ queries) | ![]() |
![]() |
Full-Text Search (FTS) | ![]() |
![]() |
Global Secondary Indexes (GSI) | ![]() |
![]() |
MapReduce views | ![]() |
![]() |
Tunable query consistency | ![]() |
![]() |
Tunable durability | ![]() |
![]() |
Development and administration tools | Community Edition | Enterprise Edition |
Web-based UI | ![]() |
![]() |
Graphical explain plan | ![]() |
![]() |
Built-in query editor | ![]() |
![]() |
Built-in schema browser | ![]() |
![]() |
Query monitoring | ![]() |
![]() |
REST API | ![]() |
![]() |
Command line tools | ![]() |
![]() |
Import and export tools | ![]() |
![]() |
ANSI Joins support in N1QL | ![]() |
![]() |
Couchbase Eventing | ![]() |
![]() |
High availability and disaster recovery | Community Edition | Enterprise Edition |
Intra-cluster replication | ![]() |
![]() |
Automatic failover | ![]() |
![]() |
Online rebalancing | ![]() |
![]() |
Index replicas and swap rebalance | ![]() |
![]() |
Cross Datacenter Replication (XDCR) | ![]() |
![]() |
XDCR filtering and throttling | ![]() |
![]() |
XDCR timestamp-based conflict resolution | ![]() |
![]() |
Rack/availability zone awareness | ![]() |
![]() |
Standard backup and restore tools | ![]() |
![]() |
High performance enterprise backup and restore tools | ![]() |
|
Full, incremental, and cumulative backups | ![]() |
![]() |
Automatic failover of disk failures, multi-nodes and server group | ![]() |
![]() |
Security | Community Edition | Enterprise Edition |
Authentication | ![]() |
![]() |
Authorization | ![]() |
![]() |
Role-Based Access Control (RBAC) | ![]() |
![]() |
LDAP integration | ![]() |
![]() |
Encrypted network access | ![]() |
![]() |
x.509 CA certificates for TLS | ![]() |
![]() |
x.509 CA certificates for data service authentication | ![]() |
![]() |
Auditing | ![]() |
![]() |
N1QL request auditing | ![]() |
![]() |
Log redactions | ![]() |
![]() |
Client-side field-level encryption | ![]() |
![]() |
IPv6 support | ![]() |
![]() |
Performance and scaling | Community Edition | Enterprise Edition |
Unlimited query concurrency | ![]() |
![]() |
Memory-optimized indexes | ![]() |
![]() |
Homogenous scaling (by node) | ![]() |
![]() |
Multi-Dimensional Scaling (MDS) | ![]() |
![]() |
Plasma – high performance storage engine for indexes | ![]() |
![]() |
Fast failover | ![]() |
![]() |
Ephemeral buckets |
|
![]() |
Ephemeral buckets with Query, Search, XDCR | ![]() |
![]() |
Index pushdown | ![]() |
|
Index partitioning | ![]() |
![]() |
N1QL aggregate pushdown | ![]() |
![]() |
End-to-end compression (client to server and XDCR) | ![]() |
![]() |
Adaptive indexes | ![]() |
![]() |
Container management and orchestration | Community Edition | Enterprise Edition |
Autonomous Operator for Kubernetes | ![]() |
![]() |
Openshift integration | ![]() |
![]() |
从表中可以看出社区版除了一些一些图形界面,高可用,维护之类的高级功能外,基本功能是有的,可以满足日常需求。除此之外社区版和企业版的api也是完全兼容的。
更重要的一点是全功能的企业版是可以在开发和测试环境中无限制使用,当然如果商业使用就需要购买授权了。
本系列所使用的版本为Server企业版6.0.0