Multi tenant application

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.

Hi @Tanmay_Gon ,

Welcome to MongoDB community!

MongoDB has verious efficient ways to implement Multi-tenancy. However, in order to better assist you please answer the following:

How many tenants are there?

Are they all have the same sizes or differ drastically?

Is there query pattern different or alike.
What is the expected data size?

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

What are the security considerations? Can developers see different tenant data? Can tenants see different tenanat data?

Are you considering a replica set or sharding? If a replica set will you shard when the data will grow?

What MongoDB version are you expect to use?

Best
Pavel