Multi tenant SAAS application

Hi ,

We are planning to create a multi tenant application in node js using mongodb as database .
What will be the database architecture ? we are planning to create databases per tenant. How to connect using moongoose ODM to implement this multi database system in mongodb?
Please suggest.

Please find the below details for your reference.

How many tenants are there - Expecting 200 to 300 tenants within 2 years.

Are they all have the same sizes or differ drastically - Differ size.

Is there query pattern different or alike - query pattern
What is the expected data size - May be drastically increase based on their data.

What is the expected growth over next 2 years - Medium level
Are all tenants and application are in a single dc or multiple - single

What are the security considerations? Can developers see different tenant data? Can tenants see different tenanat data - Developers can see different tenants data but tenants can’t see other tenants data. Data sensitivity and encryption need to add.

What MongoDB version are you expect to use - 6.0


hi @Developer_Testing,
I have almost same the problem. I found some solutions like this Node.js MongoDB - multi-tenant app by example - DEV Community 👩‍💻👨‍💻 but I don’t want to use


I want to use ModelName.find() to better development experience