Search:

Search all manuals
Search this manual
Manual
Couchbase Developer's Guide 1.8
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
7.2 Handling REST/JSON
Chapter Sections
Chapters

7.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.