Source: teo-miscia.medium.com

Multi-tenancy: a way to build SaaS products

Category: Laravel, Laravel

Each client has their data logically or physically separated from each other to avoid data leak from one client from the other. The biggest SaaS software today are bu ilt using a multi-tenant approach.Think about Jira or Slack, each workspace is independent of the others and there is no way to see the data of other workspaces in yours.

So you don’t need to deploy the same code for each client that signs up and this means no deploy costs and no resources wasted (in a dockerized environment think about deploying just one container instead of a container for each client).

The throwback of this approach is that you have to specify in all the queries of the application to filter by the client ID.

In this way you install a package, configure it and it’s finished: no changes in your queries or your models.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners