Multi-tenancy and shared data

Hi Pavel,

  1. Currently 400+ tenants in our most active region, but this increase to thousands in larger markets.
  2. Sizes differ drastically yes, if we count tenants that are a part of a branch (The branch as a single tenant, since they need to share data), they differ even more.
  3. Their query pattern is different for some tenants that use the system in a “special” way. We’ve had issues with this before and had to make optimizations specifically for them.
  4. Depends on how we structure things, but 500mb+ per tenant, hard to answer.
  5. In markets with the largest potential there might be an increase of tenants by 200+, if things explode maybe 1000, but i’d say that is unlikely, nevertheless we should plan for that.
  6. Single DC, tenants do not have isolated domains.
  7. Tenants should not be able to see other tenant data when they are not a part of a branch, when a tenant is a part of a branch, all tenants within the branch should have a common data pool (in lack of a better wording).
  8. We’ve been looking at sharding, but don’t know if that is a good fit, a replica set seems like a less complex solution. We introduce complexibility as it is with multi tenancy and multi regions handled within the same platform is that is a possibility.
  9. Latest MongoDB version

Thanks :slight_smile: