0
votes

Design a Database Architecture for a Multi-tenant Application ????️ with the following Criteria:


Multiple Tenant Types ( different schema for each Tenant with around 20 tables each)
starting with 2 should scale to 50+ Tenant Types ????
Each Tenant Type starting with 20 should scale to 1000 Tenants with 50 to 500 users each ????
Data isolation is not crucial
Cost of ownership at least, in the beginning, should be super low ????

What would be an ideal choice based on these criteria?


My choice :
Citus PostgreSQL with a Different schema/Database per Tenant type and sharding tenants, running the server on a VM. Now Citus has 2 deployment types ie..Single machine cluster and Multi-machine cluster

Can we start with a Single machine cluster initially thereby saving some bucks, and them convert to Multi-machine cluster later on with no or minimal downtime?
so from there we can scale out horizontally adding new physical worker node instances.

1

1 Answers

0
votes

Switching from single machine to multi machine should be possible, details will vary depending on your exact environment. At worst you should be able to replicate the worker databases from the single machine to new machines & then switch to using those new machines