Tenant data layout

Lock 13

Choose

Your app serves 100 small tenants: 2,000 requests/s in total, steady load. One Postgres server with 200 connections fits all of it. You have 80 USD/mo. Pick how to keep the data of each tenant apart. Keep errors under 0.1 percent.

Goals

Not tested yet

The share of requests that fail or get no answer.99 of 100 requests finish faster than this.What the servers and services cost each month.
Choose a design
Shared tables, tenant ID
A schema for each tenant
A database for each tenant