3 ms·
Postgres is enough as long as you have a good multi-tenant setup e.g. a separate database per customer. Ran a single postgres instance with multi-tenant SaaS p
by bearjaws 3y ago
Postgres is enough as long as you have a good multi-tenant setup e.g. a separate database per customer.
Ran a single postgres instance with multi-tenant SaaS product that crossed 4B records in a few tables, even with partitions and all the optimization in the world, it still hurts to have one massive database.
We still got bought tho, so I will agree its enough
- breckenedge 3y agoWorked at a company that suffered from this too. Compounded by the feature that let customers share data with other customers, so single DB was a decent architecture to begin with. And we were on postgis v1, which had no straightforward upgrade path to 2.0, nor was it supported by later versions of Postgres. Restoring a backup became a multi-day affair.
- Ensorceled 3y ago> Postgres is enough as long as you have a good multi-tenant setup e.g. a separate database per customer. Separate per customer has a lot of advantages (especially around customer security and things like deletion) but you can also shard by customer right from the beginning; customer #1 in the "odd" shard, customer #2 in the "even" shard etc. Switching to database per customer if that is working well is relatively easy so you're future proofed both ways.
- cpursley 3y agoThat's easier now than ever with services like neon.tech and fly.io where you can quickly spin up new databases via api.
- jimbokun 3y agoHow did you use partitions for scaling? Hash based partitioning on the primary keys of your tables? Or something else?