In Couchbase Server 2 most of the “background processes” that are used for replication, I/O, disk/file compaction, views, and other cleanup are per bucket.
So the reason why the documentation is mentioning as a best practice to reduce/control the number of bucket per cluster is really to avoid consuming too many resources on your servers.
We do not have a magic formula about the relation between node and buckets as it depends a lot of the volume of data and type of operations you do on them. (for example lot of mutation or not? views or not? …)
I usually take another approach when I talk to developer about their project:
you want multiple buckets, ok, but why? Can you explain why you need more?
Then we see if this “best practice” limit is an issue or not.
Some interesting reading in relation to your question:
Thanks for your response. Your question about why we need multiple buckets is also a fair one. And in our case, the answer is multi-tenancy. We are looking at hosting multiple consumers (different apps) on a single cluster. And the best way to segregate them is by allocating each one their own bucket.
I’ll go through the links you have sent and come back with if I have any further questions.
Fewer buckets (i.e. less then 4) and better machines(dedicated servers) is always the best way to go. It depends on how CB is working , lots of SETS/REPLACE/DELETE = lots of Compaction and having lots of buckets is not a good idea.
Are you going to be using views?
How much do you expect the views to be to document data 1X, 2X, 3X … etc?