How do you manage failover and replication? At my previous job this was done by a consultant. Is this doable on a self hosted setup?
Thank you in advance.
How do you manage failover and replication? At my previous job this was done by a consultant. Is this doable on a self hosted setup?
Thank you in advance.
I know of BDR, but there hasn't much news about it lately, especially with more recent versions of Pg.
We like Galera for our simple needs: we use keepalived to do health checks, and if they pass the node participates in the VRRP cluster. If one node goes down/bad, another takes over.
If you're just looking for a hot standby and dont need a multi master setup, you can set those up just with pg. https://www.postgresql.org/docs/9.4/hot-standby.html
Queries done through pgbouncer just pause as if the query is really really slow when the db goes down, then when pglookout does the failover, the bash script switches pgbouncer's config and those pending queries are sent immediately.