6 ms·
What are people/companies using currently to make their postgres database distributed these days? Currently running my app + db on Heroku in the EU and would l
by joelp 5y ago
What are people/companies using currently to make their postgres database distributed these days?
Currently running my app + db on Heroku in the EU and would like to scale out since latency is abysmal for users in Australia and Asia.
- arthurcolle 5y agoI think Citus is one option. Or possibly TimescaleDB
- manigandham 5y agoThose are meant for a single location, not cross-region distribution.
- arthurcolle 5y agoI don't think that's right. Citus has a post from 2017 talking about allowing for horizontal scaling of a postgres instance. [0] Same thing with Timescale. [1] -------------------------------------------- [0] https://citusdata.com/blog/2017/02/16/citus61-released/ https://citusdata.com/blog/2017/02/16/citus61-released/ [1] https://blog.timescale.com/blog/timescaledb-2-0-a-multi-node-petabyte-scale-completely-free-relational-database-for-time-series/ https://blog.timescale.com/blog/timescaledb-2-0-a-multi-node...
- wirelesspotat 5y agofly.io[1] supports Postgres clusters with read replicas in different cities[2] It looks like AWS's Aurora Postgres doesn't support cross-region read replicas, but apparently their Aurora "Global Database" offering does[3] - [1] https://fly.io https://fly.io - [2] https://fly.io/docs/reference/postgres/#scaling-horizontally-adding-more-replicas https://fly.io/docs/reference/postgres/#scaling-horizontally... - [3] https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Replication.html#AuroraPostgreSQL.Replication.Replicas https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide...
- craigkerstiens 5y agoFor fully managed (similar to Heroku Postgres) Crunchy Bridge [1] supports replicas across regions including say EU to AU. Which would actually couple really well with Fly.io for the app side. - [1] https://www.crunchydata.com/products/crunchy-bridge/ https://www.crunchydata.com/products/crunchy-bridge/
- manigandham 5y agoThe simple solution is to run Postgres replicas in those regions and do local reads for your app while directing the writes to the master region. This works well for read-heavy apps, and you can also put the master in a geographically central location to help with write latency. If you need cross-region multi-master then I recommend something like CockroachDB or Yugabyte that have regional distribution as a core feature.
- arcturus17 5y agoI’m glancing over the Heroku Postgres docs and they seem to offer easy to set up read replicas called “followers”. Wouldn’t this work for you?
- iampims 5y agoHeroku is only available in EU and US east. Latency from Australia is somewhat unavoidable. You can maybe reduce it by using Cloudflare or similar to terminate TLS as close to your users as possible.
- sometimes666la 5y agoCloudflare give different Anycast IPs for each plan and they don't always hit the local ingestion point. Some people shot themselves in the foot with free/pro plan in certain markets (India, aus etc..) I don't believe in May 2021 local ingestion (TLS termination) is happening on anything less than Business plan in MEL or SYD