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