Case study · 2023 · Startups · Human Capital Management
Multi-Tenant Replatform for a Workforce-Scheduling SaaS
A workforce-scheduling SaaS had grown the expensive way: one deployed copy per customer, each drifting apart in version and cost. We re-architected it as a genuinely multi-tenant platform — shared PostgreSQL with row-level security, Kubernetes-based delivery, continuous deployment — and moved every customer across in cohorts without a minute of scheduled downtime.
Screens are illustrative recreations — client interfaces stay confidential.
The challenge
Forty-plus single-tenant deployments meant forty-plus versions in production, upgrade windows negotiated customer by customer, and infrastructure cost growing linearly with every sale — the unit economics were eating the business.
The migration itself was the risk: scheduling is an always-on product for shift-based workforces, so "we'll take the weekend" was not an available strategy.
What we built
Tenancy enforced by the database
Consolidated onto shared PostgreSQL with row-level security as the isolation boundary — tenant scoping enforced below the application layer, verified by an automated cross-tenant access test suite that runs in CI.
One artifact, many tenants
The forty drifted codebases converged into a single deployable on Kubernetes, with per-tenant feature flags absorbing the genuine customization the drift had been hiding.
Cohort migration with dual-run
Customers moved in cohorts behind a sync layer that kept old and new systems reconciled; each cohort ran dual for two weeks with automated diffing before the old deployment was retired.
Delivery pipeline as the payoff
With one artifact, CI/CD went from release trains to continuous deployment — trunk-based development, progressive rollout, and instant rollback replaced the quarterly upgrade slog.
The results
- −63%
- p95 API latency
- −44%
- Infra cost per customer
- 0 min
- Scheduled downtime
1.45 s → 540 ms across top endpoints
steady state after all cohorts migrated
across the full cohort-by-cohort migration
- p95 API latency fell 63% as the shared platform got the tuning attention forty snowflakes never could.
- Infrastructure cost per customer dropped 44%, flipping the marginal economics of every new sale.
- Releases went from twice a month (per customer, eventually) to multiple times a week for everyone at once — and the migration completed with zero scheduled downtime.
Client identities stay confidential; figures are rounded from end-of-engagement delivery reporting.
Stack & expertise
- React
- TypeScript
- Node.js
- PostgreSQL (RLS)
- Kubernetes
- Docker
- AWS