Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



fly.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

- [2] https://fly.io/docs/reference/postgres/#scaling-horizontally...

- [3] https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide...


For 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/


The 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.


I’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?


Heroku 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.


Cloudflare 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


I think Citus is one option. Or possibly TimescaleDB


Those are meant for a single location, not cross-region distribution.


I 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/

[1] https://blog.timescale.com/blog/timescaledb-2-0-a-multi-node...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: