Silk Parrot
2016-07-31 02:07:09 UTC
Hi,
 We are trying build a multi tenant application and are debating which approach we should take: (also my understanding is based on that pgbouncer connection pool doesnât work across different user/database pair):
1. Â For each tenant, we create a dedicated database and a dedicated user. This option gives best isolation. However, connection pooling wonât work pgbouncer.
2. Â We put all tenants in a single database, and just use one user. I learned that pgbackup will be probamatic when there are > 30 schemas in a database, so we probably canât create dedicate schema for each tenant.
 We are more inclined to choose 1, but don't know how many concurrent connections Postgres can handle for OLTP workload in a 32GB memory, SSD box. Also we would like hear from someone with more postgres experience about the best practice for building multi-tenant application.
Thanks
RyanÂ
 We are trying build a multi tenant application and are debating which approach we should take: (also my understanding is based on that pgbouncer connection pool doesnât work across different user/database pair):
1. Â For each tenant, we create a dedicated database and a dedicated user. This option gives best isolation. However, connection pooling wonât work pgbouncer.
2. Â We put all tenants in a single database, and just use one user. I learned that pgbackup will be probamatic when there are > 30 schemas in a database, so we probably canât create dedicate schema for each tenant.
 We are more inclined to choose 1, but don't know how many concurrent connections Postgres can handle for OLTP workload in a 32GB memory, SSD box. Also we would like hear from someone with more postgres experience about the best practice for building multi-tenant application.
Thanks
RyanÂ