Multitenancy is a software architecture where different clients can sign-up to the same installation of your software, but have separated their data.
I have listed from a simple authorisation concept towards multitenancy, hoping that will clarify what it is.
A basic application has 1 login for all members who needs to access member areas and sometimes more, but they are all given the same rights. This is the simplest form of an authorised application.
A bit more complex is it when the different users can be assigned different roles. Let user A have access to create and manage other users, but user B can only view other users but not create or manage. This is an authorised application with roles.
Then there's a multitenancy, where it's the same as concept B but different clients are attached to the same software, meaning they are on the same installation but in a sort of virtual environment, where they can't access other clients data. User A can still manage and create users, so can User C but it's within a different tenancy and A and C therefor can't see the data from each other. A SaaS application is a typical multitenancy concept.
The reason to use multitenancy can often be found in either of 2 cases:
- Reduced server cost
- Large scale application
The cost reduction is achieved since your clients will share physical resources (servers, etc) across. It's a similar concept to a cloud environment where you buy a part of a larger resource.
For large scale applications it's a necessity to scale that you don't have increasing operating costs per client you make. If you want to sell a product for $10 each to 1,000 clients, it would be a shame if you had to manage 1,000 servers and installations instead of 1.
Reason 2 is the most applicable since cloud servers today are cheap.
If you don't think your application is going to sell to a lot of clients or there's no reason to share the running costs, then multitenancy might not be relevant as it is without doubt a huge increase in the complexity of your application.
Expert in Laravel and Vue backed with MySQL databases. Independent developer who does freelance and love to travel. Feel free to drop me a message.
Be the first one to comment