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

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners