Shared tables vs database per tenant
Shared tables keep every tenant in one database and filter by tenant ID. A database for each tenant gives each tenant its own copy. For 100 small tenants at 2,000 requests/s, both give p99 near 27 ms. Shared tables cost 18 USD/mo. Separate databases cost 210 USD/mo, over the 80 USD/mo limit.
Separate reader · 0 of 100 attacks reach a tool
1,500 req/s · Node API · 3 hosts · 18 USD/mo
Case 1
100 small tenants send 2,000 requests/s in total, with steady load. Errors must stay below 0.1 percent, p99 below 150 ms and cost below 80 USD/mo. The simulator does not score isolation.
| Measure | Goal | Shared tables with tenant ID | A database for each tenant |
|---|---|---|---|
| Error rate | under 0.1% | 0% Pass | 0% Pass |
| p99 latency | under 150 ms | 27 ms Pass | 27 ms Pass |
| Monthly cost | under 80 USD/mo | 18 USD/mo Pass | 210 USD/mo Fail |
| Monthly cost | 18 USD/mo | 210 USD/mo |