pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ben Chobot <bench@silentmedia.com>
To: Saurav Sarkar <saurav.sarkar1@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Database Scalability
Date: Tue, 30 Nov 2021 10:13:18 -0800
Message-ID: <71ee08fc-200b-e9de-f597-d0f6f7da6675@silentmedia.com> (raw)
In-Reply-To: <CAP+kwAU+HoYSS_WwDa17jww6sDTSQmugs9dU=PYo1D8VN-7etQ@mail.gmail.com>
References: <CAP+kwAU+HoYSS_WwDa17jww6sDTSQmugs9dU=PYo1D8VN-7etQ@mail.gmail.com>

Saurav Sarkar wrote on 11/29/21 10:13 PM:
> Hi All,
>
> We have some multi-tenant solutions which are separating the tenant 
> data in Postgresql mainly in the following manner.
>
> 1. Using different schemas
> 2. Using different tables for different tenants.

Without more details it's impossible to give you a detailed answer, so, 
in general.... if you are breaking out your client data by schema, you 
will likely be fine. We have used this method with great success to 
scale our customer workload - each customer gets their own schema, which 
we can then rebalance between databases as those clients drive more load 
over time. For those tables that we want partitioned, we simply 
partition them in every schema. That's arguably inefficient but we find 
the schema consistency to be an overall win.

(For context, when I say we have used this method with great success, we 
have over 13k customers, almost a PB of data, peak around 1.5M iops, and 
it's all painless to operate.)

view thread (8+ messages)  latest in thread

Message-ID: <71ee08fc-200b-e9de-f597-d0f6f7da6675@silentmedia.com>
Permalink:  ../71ee08fc-200b-e9de-f597-d0f6f7da6675@silentmedia.com/
Also on:    postgresql.org/message-id/71ee08fc-200b-e9de-f597-d0f6f7da6675@silentmedia.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: bench@silentmedia.com, saurav.sarkar1@gmail.com
  Subject: Re: Database Scalability
  In-Reply-To: <71ee08fc-200b-e9de-f597-d0f6f7da6675@silentmedia.com>
  References: <CAP+kwAU+HoYSS_WwDa17jww6sDTSQmugs9dU=PYo1D8VN-7etQ@mail.gmail.com> <71ee08fc-200b-e9de-f597-d0f6f7da6675@silentmedia.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox