Search:

Search all manuals
Search this manual
Manual
Membase Manual 1.7
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
7.1 REST/JSON
Chapter Sections
Chapters

7.1.2. Encoding the vbucketId into each request

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