3 ms·
> Is it not a good idea to spin up separate db instances for each client/company? It depends, really. There is a trade-off in terms of software and operational
by andyjohnson0 5y ago
> Is it not a good idea to spin up separate db instances for each client/company?
It depends, really. There is a trade-off in terms of software and operational complexity vs scalability/perf and isolation. And probably a bunch of other factors.
If you have separate databases for each customer, schema migrations can be staged over time. But that means your software backend needs to be able to work with different schemas concurrently. You can also benefit from resilience and isolation guarantees provided by the dbms. On the other hand, having a dbms manage lots of databases can affect perf. Linking between databases can be a minefield, especially w/r/t foreign keys and distributed transactions.
https://docs.microsoft.com/en-us/azure/azure-sql/database/saas-tenancy-app-design-patterns https://docs.microsoft.com/en-us/azure/azure-sql/database/sa...
- Spivak 5y ago> But that means your software backend needs to be able to work with different schemas concurrently. Not if you're truly multi-tenant and each customer has their own app servers. Then your code and schema version are always in lock-step.
- andyjohnson0 5y agoTrue. But then you have an additional problem ...