Multi-Tenancy Isn't About Databases

2026-07-18 · page · source ↗ · source summary

Derek Comartin argues that multi-tenancy discussions fixate on the wrong question — shared database vs. database per tenant — when the real question is what you're trying to isolate. Every shared resource couples tenants together; the architecture is a spectrum of isolation choices across data, compute, queues, caching, and deployment, not a binary database decision.


Key Quotes

"That shared infrastructure which seemed simple is also what is coupling everything together."

The core diagnosis. Simplicity at the infrastructure layer doesn't eliminate coupling — it just hides it until a tenant with different behavior exposes it.

"Multi-tenancy is not just about databases. It is about creating isolation through boundaries. A database is just one of those boundaries."

The thesis statement. Boundaries can be drawn at the database, compute, queue, cache, or region level. The first question isn't "which database topology?" — it's "what are we actually trying to isolate?"

"Every time tenants share something, they are coupling through it."

A structural claim: coupling isn't a design choice you opt into or out of; it's a physical consequence of shared resources. If tenants share a schema, they're coupled through migrations. If they share an API instance, they're coupled through deployments and failures.

"There is nothing inherently wrong with this. As long as you understand the trade offs."

Comartin is no purist. A shared database with tenant ID segregation is a perfectly valid starting point. The sin isn't the design — it's not knowing what you're trading away.

"You are providing deployment isolation. You are not necessarily providing schema isolation."

A crucial distinction. Giving Tenant A version 1 and Tenant B version 2 of your application is deployment isolation, but if they share a schema, every change must still be backward-compatible. The isolation people think they're getting from canary deployments evaporates at the data layer.

"Sharing gives you efficiency. It is usually simpler and more cost effective. Isolation gives you more control. But that control comes with more cost and more complexity."

The fundamental trade-off, stated plainly. This isn't a moral argument — it's economics.

Key Themes

Critical Analysis

Comartin's framing is refreshingly honest about the trade-offs, but two things go under-explored.

First, the operational cost of the "mix and match" approach. A spectrum is elegant in theory but brutal to operate. If Tenant A is on a shared database but Tenant B has a dedicated one, your backup strategy, monitoring, and migration tooling now have two code paths. Add tenant-specific queue topologies, cache configurations, and deployment schedules, and you've built a combinatorial operational matrix. The article treats "mix and match" as freedom — and it is — but it's also an ops tax that compounds with every dimension of isolation you vary. The real-world answer is usually "pick two isolation tiers and force everyone into one of them," which is less elegant but more survivable.

Second, the article underweights the organizational dimension. The reason "shared database vs. database per tenant" dominates discussion isn't just technical myopia — it's that the database is where organizational boundaries collide. The DBA team owns the database. The platform team owns compute. The SRE team owns deployments. When you say "isolate at the queue level," you're asking the messaging team to solve a problem the database team created. Multi-tenancy discussions are political, not just architectural. Comartin's framework would be stronger if it acknowledged that the "first question" is often "who owns this problem?" and the answer isn't always the team best positioned to solve it.

That said, the article succeeds at its core mission: unbundling multi-tenancy from database choice. For anyone who's ever been in a meeting where the architecture discussion dead-ends at "well, should we go database-per-tenant?", this is the article to send before the meeting.

Cross-References

Related but not yet linked: rate limiting patterns, tenant-aware caching strategies, backward-compatible schema migration tooling.


Sources: raw/multi-tenancy Last updated: 2026-07-18