
Your multi-tenant SaaS is one extra database engine away from breaking.
Most multi-tenant SaaS apps start with one database engine, usually Postgres. RLS works, tenant_id columns work, the architecture feels solid. Then six months in, a feature needs a document store, a cache, a different relational engine for a third-party integration. Suddenly you have multiple engines, each with its own tenant isolation problem, each with its own connection pool, each with its own silent-failure mode.
The standard answer is: pick one engine, force everything through it. The honest version: most real apps need more than one. AI apps need at least three. And the moment you add the second engine, your "we use RLS" answer to the compliance question stops working.
TenantsDB is an orchestration layer that gives every tenant their own physically isolated database across PostgreSQL, MySQL, MongoDB, and Redis, behind one proxy and one API.
A few things that fall out of building it polyglot from day one:
One tenant can use multiple engines. Postgres for transactions, MongoDB for documents, Redis for cache, all isolated per-tenant, all under the same tenant ID. One API call provisions all of them. Connection strings stay stable forever.
Schema-first across engines. You design a schema as a versioned blueprint in a workspace, then deploy it to every tenant database in one command. Add a column in dev, push it to 1,000 tenants. Same flow for Postgres tables, MySQL tables, Mongo collections.
OmniQL. One query language that compiles natively to all four engines. Write :GET User WHERE id = 42, the proxy compiles it to SQL for Postgres/MySQL, find() for Mongo, HGETALL for Redis. Open source. Optional, you can still use native drivers.
Two isolation tiers, switchable per-tenant. Tenants start on shared infrastructure (L1) for instant provisioning. When a customer goes enterprise or starts impacting others, one command migrates them to dedicated infrastructure (L2) using native logical replication (PG PUBLICATION/SUBSCRIPTION, MySQL binlog, MongoDB change streams). Sub-2-second cutover. Connection strings don't change.
Proxy-enforced settings. query_timeout_ms, max_rows_per_query, max_connections, blocked commands per engine. Enforced at the proxy, not in your app code. DDL is blocked on tenant connections so schema can only change through blueprint deployments. No drift.
Benchmark numbers, measured:
| Engine | Direct p50 | Proxy p50 | Overhead |
|---|---|---|---|
| PostgreSQL | 0.82ms | 2.23ms | +1.41ms |
| MySQL | 1.01ms | 2.34ms | +1.33ms |
| MongoDB | 1.45ms | 3.32ms | +1.87ms |
| Redis | 0.66ms | 3.09ms | +2.43ms |
Zero errors across 2 million queries at 100 concurrent tenants.
Free for 5 tenants. tenantsdb.com
Isolated Tenant section screenshot below.
Curious what others here are using for multi-engine multi-tenancy. Are you forcing everything through Postgres, running separate orchestration per engine, or building a custom routing layer?