All posts SaaS Development

Multi-Tenant SaaS Architecture Explained for Non-Technical Founders

I
iSolution Technologies
Nov 17, 2026 · 8 min read
Multi-Tenant SaaS Architecture Explained for Non-Technical Founders

Your customers can share one database, get a database each, or get a whole copy of the product. Here is what each multi-tenant setup costs to run, where each one breaks, and the signs that it's time to move.

Your developer asks whether customers should share one database or get one each, and you're expected to have an opinion. The short answer: most new SaaS products should start with one shared database, with every row tagged by the customer it belongs to. The alternative gets expensive fast. On DigitalOcean's smallest managed MySQL database at $15.15 a month, giving each of 200 customers a server of their own comes to $3,030 a month, against $122.10 for one larger shared cluster. Those are list prices used as an illustration, worked through below.

Multi-tenant means one running product serves many customers, and each customer (a tenant) only ever sees its own data. The architecture question is where you put the walls.

What does multi-tenant mean in plain terms?

Picture a block of flats. The foundations and the lifts are shared, and every front door has its own lock. In a SaaS product the shared parts are the code and the servers it runs on. The locks are whatever keeps tenant A's invoices out of tenant B's screens.

Single-tenant is the opposite: a detached house per customer. Nothing is shared, so nothing leaks through a shared wall, and you pay for every roof separately.

The three ways to separate customer data

Cloud vendors use different names for the same three ideas. AWS calls the ends of the scale pool and silo. Microsoft's guide to tenancy models describes the same range, from sharing everything to sharing nothing, with mixed setups in between.

ModelWhat customers shareHosting cost as you growMain risk
Shared database, tenant ID on every rowCode, servers, database, tablesLowest, grows slowlyOne missed filter shows the wrong customer's data
Database per tenantCode and app serversLow to mediumEvery schema change runs once per customer
Full copy per tenantCode onlyRises with every customerCost, and updates spread across many copies
Diagram of three tenancy models: shared database with tenant ID on every row, database per tenant, and a full copy per tenant, for customers A, B and C

Option 1: one shared database

Every table that holds customer data gets a tenant_id column, and every query filters on it. There's one database to back up and one migration to run on release day.

The weak spot is the filter. Write one query without it and a customer sees someone else's records. The Laravel package Tenancy for Laravel is candid about this in its single-database docs: scoping applies automatically to models that belong to a tenant directly, but a call like Comment::all() on a model that only belongs to a tenant through a post isn't scoped, and can return other tenants' comments.

How do you stop one customer seeing another's data?

Two layers. The first lives in the application: a global rule on every tenant-owned model that adds the filter for you, so a developer has to go out of their way to skip it.

The second lives in the database, if you use PostgreSQL. Its row security policies have been in the product since version 9.5, released on 7 January 2016. Turn them on for a table and the database itself refuses rows the policy doesn't allow. With no policy at all, the default is deny. There's a catch worth knowing: the table's owner normally bypasses the policies unless the table is set to FORCE ROW LEVEL SECURITY, and superusers always bypass them. So the app has to connect as a role that doesn't own the tables.

Then test it. Log in as tenant A and request tenant B's records by ID, on every screen that takes an ID. It's dull work, and it catches the bug that ends companies.

Option 2: a database for each customer

The application is shared, but each tenant's data sits in its own database. Microsoft calls this a horizontally partitioned deployment. Leaking data through a forgotten filter becomes much harder, because the app connects to one tenant's database at a time.

It also eases the noisy neighbour problem. If one customer runs a huge report, its own database takes the load and the shared app tier carries on for everyone else.

Many databases don't have to mean many servers. One managed database cluster can hold a database per customer, so the hosting bill stays close to option 1. The cost moves to operations instead. A release that adds a column runs once per tenant, and when it fails on customer 147 of 200 you have a half-migrated fleet to sort out. The same Tenancy for Laravel docs put it plainly: one database means lower devops complexity but more code complexity, and many databases is the reverse.

Option 3: a full copy of the product per customer

Each customer gets its own app servers and its own database. Microsoft's guide sums up the cost in one line: if one tenant needs a given amount of infrastructure, 100 tenants probably need 100 times that.

What you buy with that money is isolation. A bad deploy can be rolled out to a few customers first, a heavy tenant can't slow anyone else down, and a customer with strict rules about where data lives can have it there. For a handful of large clients this is fine. For a self-serve product with hundreds of small accounts it's a trap, since every sign-up becomes a provisioning job.

What each model costs to run: a worked example

Take an illustrative product with 200 customers on DigitalOcean's managed database pricing, as listed in November 2026:

  • Shared database: one MySQL cluster with 8 GiB of memory and 4 vCPUs at $122.10 a month.
  • Database per tenant: the same cluster holding 200 databases, still $122.10 plus any extra storage at $0.215 per GiB per month. The real cost is developer time spent on migrations and monitoring.
  • Full copy per tenant: 200 of the smallest clusters (1 GiB, 1 vCPU) at $15.15 each is $3,030 a month for databases alone, before a single app server.

Real workloads won't divide this neatly, and 1 GiB is tight for anything busy. The gap is the point. Hosting is still a small line next to the build itself, which is covered in what it costs to build a SaaS product, line by line.

A man and a woman in business clothes looking at a whiteboard in a bright office
Photo by Yan Krukau on Pexels

When should you switch models?

You rarely move every customer at once. You move the customers who need it. Three signals tend to show up first:

  • A prospect's security questionnaire asks for dedicated data storage, and the deal is big enough to pay for it.
  • One tenant's exports or reports slow the app down for everyone else, week after week.
  • A customer needs its data kept in a specific country.

Microsoft's guide describes the usual answer: keep most customers on shared infrastructure and give single-tenant deployments to the few who need them, at a higher price that covers the cost. That only works if the code was written to run both ways, which is the decision to get right early.

What we'd build first

A shared database, a tenant ID on every customer table (not just the top-level ones), automatic scoping in the framework, and a test suite that tries to cross tenant lines. That's cheap to run, and it keeps the door open: with the ID on every row, moving a large customer to its own database later is a filtered copy rather than a rebuild. It's also why the MVP Sprint on our multi-tenant SaaS development page lists a multi-tenant foundation as part of the first release, not a later phase.

Four questions to put to your developer

  • Which tables don't have a tenant ID, and why?
  • If someone writes a query and forgets the tenant filter, what stops the data going out?
  • Do we have a test that logs in as one customer and asks for another customer's records?
  • If our biggest customer asked for its own database next quarter, how many days would that take?

If the last answer is "we'd have to rebuild", have that conversation now, while the product has 20 customers instead of 200.

Questions founders ask about tenancy

Is a multi-tenant SaaS less secure than single-tenant?

Not by default, but it has one extra way to fail: code that forgets to filter by customer. Automatic scoping in the framework, a database-level guard where the database offers one, and tests that try to read another tenant's records close most of that gap.

Can I move from a shared database to separate databases later?

Yes, if every table carries the tenant ID from day one. Then moving a customer out is a copy job filtered by that ID. If some tables only link to the tenant through other tables, the move turns into a data cleanup project first.

Does this work with MySQL, or only PostgreSQL?

Both. Row-level security as described above is a PostgreSQL feature. On MySQL the same guard lives in the application, as an automatic scope on every model that belongs to a tenant.

What is a noisy neighbour?

A tenant whose heavy use slows everyone else on shared infrastructure. A big export or report from one customer eats the database time the others were using. Separate databases for the heaviest tenants is the usual fix.

Will customers ask for their own database?

Larger and regulated buyers sometimes do, often during procurement. Microsoft's own guidance suggests treating dedicated infrastructure as a higher-priced option, so the customer who needs it pays for it.

Building something like this?

Tell us what it needs to do, and we'll scope it with you.

Start a project →