SaaS Application: Multi-tenant architecture.

Most of the contents in this post is taking from Multi-Tenant Data Architecture. This is just a quick reference.

Designing single-instance, multi-tenant architecture is not that easy. It required more work to do. SaaS application is distinguished by three qualities: scalability, configurability, and multi-tenant efficiency.

Multi-tenant architecture

Three approaches for multi-tenant:

Separate Databases:



Suitable: For customers that are willing to pay extra for added security and customizability. For example: banking or medical records.

Shared Database, Separate Schemas:



Suitable: For applications that use a relatively small number of database tables, on the order of about 100 tables per tenant or fewer.

Shared Database, Shared Schema



Suitable: when it is important that the application be capable of serving a large number of tenants with a small number of servers.

For more details read this topic Choosing an Approach

Scalability of database:

Two main tools to use when scaling out a database out are replication and partitioning.

Database clustur: deplicate databases on multible servers and load balance connection to these servers.


comments powered by Disqus