When building QeakFlow (a privacy-first, GDPR-compliant email marketing SaaS), we made a radical architecture choice: no shared database with tenant_id columns.
Instead, every workspace runs in its own isolated container with its own dedicated database.
Here’s why we built it this way, how it works under the hood, and the massive trade-offs we deal with daily.
Why Hard Isolation?
Zero Data Leak Risk (GDPR): In a multi-tenant DB, a single missing WHERE tenant_id = x in a complex JOIN leaks PII. With separate DBs, cross-contamination is physically impossible. Deleting a user’s data is literally DROP DATABASE.
No "Noisy Neighbors": Heavy email imports/dispatches hit isolated CPU/RAM limits without slowing down other users.
Isolated Blast Radius: Users connect their own SMTP credentials (BYO-SMTP). If a external SMTP socket hangs, it only affects that single tenant's worker container.
The Tech Stack
We run a lean setup on Ubuntu 24.04:
The Painful Trade-offs
Questions for the IH Community:
Would love to hear how other founders balance privacy guarantees with infrastructure costs!