Currently we have a Fly Postgres app with only one instance. Due to the budget constraint we are not using 3 instance HA cluster.
We have a few questions:
If the Postgres app crashes due to a failure in the data center, e.g. a disk failure, will the snapshots still be available? Are the snapshots stored in a different place/zone/region? What’s the reliability of these snapshots?
If we create a read replica for the Postgres app in a different region, does it increase the reliability of the snapshots?
Or do you advice us to keep the read replica in the same region as the primary? I guess the read replica will be placed in a different zone of the same region. How much does it help with the data durability?
We are primarily concerned about the data durability of our Postgres app. Please advice.
Yes. A replica will at least keep the last-ish version of the data.
A replica in the same region will still help (but it’s always more probable to lose a region than to lose two regions).
Whichever option you choose, you still need proper backups. @mayailurus mentioned WAL archiving, which is a great option.
Depending on your availability needs and recovery objective you might find 1 instance with WAL archiving a good solution: you might suffer some unavailability, but with just a bit of luck (and monitoring ;-)) you won’t lose more than 2-5 times your archive_timeout.