I am building a Multi-tenant SaaS app, where I have many customers (can span from hundreds to thousands). Each of these customers have customers of their own, who can make accounts and interact on our app. I am using Node for my server and MongoDB for the Database.
Currently, my approach to storing my tenants' data is placing all their data in one database and to use Mongodb Sharding to partition all my tenant's data and scale up when I need it in the future. MongoDB sharding seems to me like a great way to partition and manage my data.
However, there are some people who recommend that I should have one database for each tenant. They say it is better, as it is easier to "migrate/manage/scale" and "more secure". I would like to get a second opinion on this.
Giving each tenant a database increases the complexity of my app, so I would like to know if its really necessary.
I would be grateful for any insights. Thank you in advance for your answer!