Couchbase Server Basic Concepts
Couchbase Server Basic Concepts
Couchbase Server provided client protocol compatibility with memcached, but added disk
persistence, data replication, live cluster reconfiguration, rebalancing and multitenancy with data
partitioning
With Couchbase Server, JSON documents are used to represent application objects
and the relationships between objects. This document model is flexible enough so that
you can change application objects without having to migrate the database schema, or
plan for significant application downtime. The other advantage of the flexible, document-
based data model is that it is well suited to representing real-world items.
Easy scalability
It is easy to scale with Couchbase Server, both within a cluster of servers and between
clusters at different data centers. You can add additional instances of Couchbase
Server to address additional users and growth in application data without any
interruptions or changes in application code. With one click of a button, you can rapidly
grow your cluster of Couchbase Servers to handle additional workload and keep data
evenly distributed. Couchbase Server provides automatic sharding of data and
rebalancing at run time; this lets you resize your server cluster on demand.
There is no single point of failure, since the data can be replicated across multiple
nodes. Features such as cross-data center replication, failover, and backup and restore
help ensure availability of data during server or datacenter failure.
Couchbase Architecture
Couchbase is the merge of two popular NOSQL technologies:
Transaction Model
Similar too many NOSQL databases, Couchbase’s transaction model is primitive as compared
to RDBMS.
Virtual Buckets
The basic unit of data storage in Couchbase DB is a JSON document (or primitive data
type such as int and byte array) which is associated with a key. The overall key space
is partitioned into 1024 logical storage unit called “virtual buckets” (or vBucket). vBucket
are distributed across machines within the cluster via a map that is shared among
servers in the cluster as well as the client library.
High availability is achieved through data replication at the vBucket level. Currently Couchbase
supports one active vBucket zero or more standby replicas hosted in other machines.
Currently the standby server are idle and not serving any client request. In future version of
Couchbase, the standby replica will be able to serve read request.
Load balancing in Couchbase is achieved as follows:
When machines are added and removed in the cluster. The administrator can request a
redistribution of vBucket so that data are evenly spread across physical machines.
Data Server
Data server implements the memcached APIs such as get, set, delete, append,
prepend, etc. It contains the following key data structure: