Hybrid-tenancy with MongoDB in .NET API — Part 01

Single-Tenant

This technique consists of providing all of the new infrastructure necessary to stand-up an application. So, this signifies that you create a new instance of applications, a new database, and all other necessary things.

Multi-Tenant

In this technique, all clients use the same application and the same database, but you can separate the logic by schema and/or using Foreign Keys. In this case, the volume of data in the database can be grown a lot, and the risk to share/leak out the same data is high too.

Hybrid-Tenant

This is, maybe, the best alternative. This technique uses the same application but uses a different database, according to the client. So, the risk to share/leak out the data is less than the previous technique, and it is possible to do a horizontal scale.

What do you need to evaluate?

According to Fernando Neiva Paiva in his article about the tenants, we think about seven points:

  • Budget
  • Scalability and elasticity
  • Functional requirements
  • Operations
  • Customizations

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store