There is a lot of information available in splitting your application in one or multiple OTP applications, which can be deployed in a distributed fashion, as to perform failover/takeover when one of the systems breaks down (And the app as a whould could still be usable by using the Border Gateway Protocol to have these multiple servers listen on the same IP address).
However, in an application where data is stored in a Postgres database, I’d like the data stored there to also remain available when one of the servers goes down.
I know that Postgres contains some tools to allow the replication and sharding of data, but no specifics. I am wondering what would be the best way to configure Postgres to ensure that data remains available when one of the servers (temporarily) goes down.
Is there anyone who would like to share some insights on this?