Search:

Search all manuals
Search this manual
Manual
Couchbase Server Manual 1.8
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
10 Couchbase Architecture
Chapter Sections
Chapters

10.7. vBuckets

10.7.1. Couchbase Document ID-vBucket-Server Mapping Illustrated
10.7.2. vBuckets in a world of memcached clients

Warning

For simplicity, in this section we completely ignore Couchbase Server multi-tenancy (or what we have historically called a "bucket," which represents a "virtual couchbase instance" inside a single couchbase cluster). The bucket and vBucket concepts are not to be confused - they are not related. For purposes of this section, a bucket can simply be viewed as synonymous with "a couchbase cluster."

A vBucket is defined as the "owner" of a subset of the key space of a Couchbase Server cluster.

Every document ID "belongs" to a vBucket. A mapping function is used to calculate the vBucket in which a given document ID belongs. In couchbase, that mapping function is a hashing function that takes a document ID as input and outputs a vBucket identifier. Once the vBucket identifier has been computed, a table is consulted to lookup the server that "hosts" that vBucket. The table contains one row per vBucket, pairing the vBucket to its hosting server. A server appearing in this table can be (and usually is) responsible for multiple vBuckets.

The hashing function used by Couchbase Server to map document IDs to vBuckets is configurable - both the hashing algorithm and the output space (i.e. the total number of vBuckets output by the function). Naturally, if the number of vBuckets in the output space of the hash function is changed, then the table which maps vBuckets to Servers must be resized.