[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    [GENERAL] How to best archetect Multi-Tenant SaaS application using Postgres
From:       Silk Parrot <silkparrot () gmail ! com>
Date:       2016-07-31 2:07:09
Message-ID: etPan.579d5d52.7f6a0b8e.5fc () gmail ! com
[Download RAW message or body]

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  


[Attachment #3 (text/html)]

<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body \
style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: \
after-white-space;"><div id="bloop_customfont" \
style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: \
0px; line-height: auto;"><div id="bloop_customfont" style="margin: \
0px;">Hi,</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div \
id="bloop_customfont" style="margin: 0px;">&nbsp; 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):</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div \
id="bloop_customfont" style="margin: 0px;">1. &nbsp;For each tenant, we create a \
dedicated database and a dedicated user. This option gives best isolation. However, \
connection pooling won't work pgbouncer.</div><div id="bloop_customfont" \
style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">2. \
&nbsp;We put all tenants in a single database, and just use one user. I learned that \
pgbackup will be probamatic when there are &gt; 30 schemas in a database, so we \
probably can't create dedicate schema for each tenant.</div><div \
id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" \
style="margin: 0px;">&nbsp; 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.</div><div id="bloop_customfont" \
style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: \
0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">Thanks</div><div \
id="bloop_customfont" style="margin: \
0px;">Ryan&nbsp;</div><div><br></div></div></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic