Qqwy

Qqwy

TypeCheck Core Team

Elixir/Phoenix + Postgres, fault-tolerant together?

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?

Marked As Solved

OvermindDL1

OvermindDL1

There are multiple styles of PostgreSQL replication, have you looked at any of them to start? Do you prefer to replicate commands (rows might be in different orders in different ones, but is faster and more reliable), or do you prefer to replicate binary (all databases remain in perfect sync, but if one gets corrupted then that corruption can also replicate out ^.^;).

Where Next?

Popular in Questions Top

vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 131117 1222
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New

We're in Beta

About us Mission Statement