Separate bucket for non-JSON data


If I have a large number of just key-value data (session_IDs, counters etc), as well as JSON documents, for performance is it better to put the non-JSON documents in a separate bucket or does it not make any difference?


I don’t think it would make a difference. Typically you would use separate Buckets for separate applications. In certain circumstances you might want to use a separate Bucket for say the sensitive data in an application, but I think it is more of a design preference.



Thanks for your reply.

That’s pretty much what I guessed. The only thought I had in mind really was with regards to when a bucket has no indexes / views on it, because all of the data is non-JSON. I’m guessing that if a document is not recognized as JSON, then things like indexes and views wouldn’t even be looked at, but I was just wondering if it might be slightly more efficient if the whole bucket didn’t have any views/indexes on it.

Also, I know that in the past it was highly recommended to have a low number of buckets. Is that still the case (and if so, can you briefly explain the reason)?

I’m currently planning to have about 6 or 7 buckets. Does that seem like a fair number, or should I try to reduce it even further?

Thanks again!

Really depends on your use case. How many documents, how many applications, etc.

Different buckets means you can have different bucket replica settings, different backup strategies, different XDCR, etc.

1 Like