couchbase

What do to when you are reaching the document size limit?


If you develop an marketplace and every user can create products then the limits can reached sometimes.

I have read ebay makes 300k write per second so the document size limit can be reached at some minutes or do I have understand something wrong ?

I create a collection products and create recommendation in a seperate collections but if you have a marketplace you store all products in one collection. This limit can be reached in a certain time

Do you store all products that are created in one document ? Then the size limit 20MB can be reached, if you create a new collection for each product then also the limit 1000 can be reached so how the others do it ?

can someone enlighten me ? Maybe I have misunderstood something


Solution

  • There is a size limit per document (20mb), but there is no limit on the number of documents. Yes, there are some limits on the number of scopes and collections. However, a collection can contain many documents. It would not make sense to create a single collection per document. So, in your use case, you might have a "products" collection, a "user profile" collection, an "invoice" collection, etc. And each of those collections could contain many, many documents.

    There are practical limits, of course. But currently, Couchbase can handle terabytes of data, especially with the newer magma engine.