Search:

Search all manuals
Search this manual
Manual
Couchbase Developer's Guide 2.0
Community Wiki and Resources
Download Couchbase Server 2.0
Couchbase Server 2.0 Manual
Client Libraries
Couchbase Server Forum
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
8.2 Getting Cluster Topology
Chapter Sections
Chapters

8.2.3. Encoding the vBucketId

As the user's application makes item data API invocations on your client library (mc.get("some_key"), mc.delete("some_key"), your client library will hash the key ("some_key") into a vBucketId. Your client library must also encode a binary request message (following memcached binary protocol), but also also needs to include the vBucketId as part of that binary request message.

Note

Python-aware readers might look at this implementation for an example.

Each couchbase server will double-check the vBucketId as it processes requests, and would return NOT_MY_VBUCKET error responses if your client library provided the wrong vBucketId to the wrong couchbase server. This mismatch is expected in the normal course of the lifetime of a cluster -- especially when the cluster is changing configuration, such as during a Rebalance.