About the size of the key and value stored in membase
Wed, 01/26/2011 - 19:55
Hi all ,
I wrote some test code on membase server.And when i call the "Set" function to set some data i will get some errors if the key length is bigger than 250.
I remember that it is said that the length of the key in membase is limit to 1024 and the length of the value is 20M but i forget the document.
I am not sure which client for accessing membase will be the better and support the big key(key length limit to 1024).The client libraries for the memcache are also work in membase , so i always call the library for memcacahe to access mambase,such as libmemcached.
And i am not sure that to modify the definetion MEMCACHED_MAX_KEY in the libmemchaced would cause any error.
I believe the current key limit is 255 (though your experience seems to suggest it's more like 250 which probably takes into account some flags and overhead). You are correct that the limit on the value size is 20mb for Membase and it is 1mb for a memcached bucket.
Some clients may actually not allow you to set an item whose value is larger than 1mb because they perform a check before sending it to the server, but that's a different error and varies by client library.
We've had some interest in supporting longer keys, I will add your request to the list. Can you describe the use case a bit more that you would like to use keys longer than 250 bytes?
Perry
Forum support is great for free but sometimes you need a guaranteed response time and dedicated resources for your questions or issues.
Consider purchasing enterprise-level support from Couchbase: http://www.couchbase.com/products-and-services/overview
Call or email "sales -at- couchbase-dot- com" today!