Ask HN: How to distribute/sync a postgresdb geographically?
So I'm wondering, if I create a Django application that uses a Postgres DB, and I want to be able to deploy it in multiple locations to reduce latency.
How would I ensure that an update in user data against one dB is synced with the other DBs.
Assuming there are DBs in America, Asia and Europe?
Are there any solutions to do syncing on the database level?
Does Django provide any of this functionality?
Should the problem be approached from the database level or the application level?
6 comments
[ 2.8 ms ] story [ 20.7 ms ] threadI guess the syncing aspect is going to be most complicated part.
I was thinking that I could have some logic that stores where the user's nearest DB is as part of their user info, and just store their data there. But still not sure if that's the best way.
Thanks for mentioning Citrus DB, I looks like they have an open source version that I'll try checking out.