What is the recommended approach towards multi-tenant databases in MongoDB?

后端 未结 6 1179
轮回少年
轮回少年 2020-12-02 04:08

I\'m thinking of creating a multi-tenant app using MongoDB. I don\'t have any guesses in terms of how many tenants I\'d have yet, but I would like to be able to scale into t

6条回答
  •  再見小時候
    2020-12-02 04:54

    According to my research in MongoDB. Trucos y consejos. Aplicaciones multitenant. that option is not recommended if you do not know how many tenants you can have, it could be thousands and it would be complicated when it comes to sharding, also imagine having thousands of collections in a single database ... So in your case it is recommended to use option one. Now if you are going to have a limited number of users, it is already different and yes, you could use option two as you thought.

提交回复
热议问题