I've seen SaaS applications hosted in many different ways. Is it a good idea to split features and modules across multiple databases? For example, putting things like the User table on one DB and feature/app specific tables on another DB and perhaps other commonly shared tables in another DB?
Multi-Tenant – Multi-tenancy means that a single instance of the software and its supporting infrastructure serves multiple customers. Each customer shares the software application and also shares a single database. Each tenant's data is isolated and remains invisible to other tenants.
You can use two databases the same reason most banks have two ATMs, for reliability.
Many organizations are opting for a hybrid infrastructure that combines on-premises and cloud resources to furnish the systems and applications needed to run a business. An average company can have multiple databases running on different infrastructures that all need to be managed and maintained by a single team.
Software as a service (SaaS) is a cloud-based software delivery model in which the cloud provider develops and maintains cloud application software, provides automatic software updates, and makes software available to its customers via the internet on a pay-as-you-go basis.
Start with one database. Split data/functionality when project requires it.
Here is what we can learn from LinkedIn:
Source:
LinkedIn architecture
LinkedIn communication architecture
High Scalability is a good blog for scaling SaaS applications. As mentioned, splitting tables across databases as you suggested is generally a bad idea. But a similar concept is sharding, where you keep the same (or similar) schema, but split the data on multiple servers. For example, users 1-5000 are on server1, and users 5000-10000 on server2. Depending on the queries your application uses, it can be an efficient way to scale.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With