Does CouchBase have a limit on number of buckets?


#1

I am new to CouchBase and wondering is there a limit to number of buckets that can created in CouchBase 2.0?

2nd question,

Will a Couchbase instance with data distributed in many buckets perform slower than a instance with all data in one bucket?

Thanks for your response.

Ajay


#2

Hello Ajay,

1- Maximum number of buckets
Yes Couchbase has a limit in the number of bucket, usually 10 is a good number even if you can go up to 128, as you can see in this part of the documentation :
http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-admin-restapi-max-buckets.html

This is due to the fact that many processes such as write/read, replication, compaction, are organized by buckets so if you have too many buckets you may ended with too much CPU/IO consumption.

Note that this limit is usually not a problem since you can store many documents and documents types in each buckets.

Do you have a specific requirement that would need many buckets?

2- Performance & number of buckets

Based on my comment above, the short answer, is if you have less bucket it will be a little faster (since you have less CPU/IO consumption). But the reality is it depends of each use case and the type of data you store (JSON or other content, with or without views, … )

Regards