The architectural decisions that look optional early on but quietly determine how far a product can grow — a field guide from real client builds.
Most SaaS platforms don't fail because of a single bad decision. They fail because a dozen reasonable-looking shortcuts — taken under deadline pressure in the first few months — quietly compound into an architecture that can't grow.
This article distills patterns we've used across real client builds at Archiom: the choices that look optional early on but end up determining how far a product can scale.
The single most consequential early decision is how you isolate tenants. The right answer depends on your compliance needs, customer size, and how much operational complexity you can absorb.
| Model | Isolation | Best for | Trade-off |
|---|---|---|---|
Shared schema, tenant_id | Logical (row-level) | Most B2B SaaS | Discipline on every query |
| Schema-per-tenant | Stronger | Mid-market, some compliance | Heavier migrations |
| Database-per-tenant | Strongest | Enterprise, strict isolation | High operational overhead |
For most products, a shared schema with a mandatory tenant_id is the right start — provided isolation is enforced in one place rather than sprinkled across the codebase.
class TenantRepository {
constructor(private db: DB, private tenantId: string) {}
invoices() {
// every query is automatically scoped
return this.db.invoice.where({ tenantId: this.tenantId });
}
}tenantId as an optional parameter on each query. The first time someone forgets it, you have a cross-tenant leak. Bind it once.You almost certainly have more reads than writes. Before reaching for sharding, work through the cheap wins in order:
async function onOrderCompleted(order) {
await queue.enqueue('send-review-request', {
tenantId: order.tenantId,
sendAfter: addDays(Date.now(), 3),
});
}Scalability is rarely about one clever optimization — it's about a hundred boring boundaries drawn correctly on day one.— Archiom Engineering
You can't scale what you can't see. Structured logs, metrics, and traces are how you'll diagnose the first real incident — instrument the boundaries early.
99.9%
Realistic uptime
<1%
Error budget
p95
Latency that matters
Backend & architecture
Archiom's backend group — multi-tenant SaaS, APIs, and the infrastructure decisions that quietly determine whether a product scales.
View all articlesWork With Us
Archiom helps startups, agencies, and businesses build scalable digital products and business solutions.