3 ms·
one of the solutions which made it pretty simple for us to run postgresql in a ha environment (mostly in k8s, but works standalone as well) is zalandos patroni:
by merb 3y ago
one of the solutions which made it pretty simple for us to run postgresql in a ha environment (mostly in k8s, but works standalone as well) is zalandos patroni: https://github.com/zalando/patroni https://github.com/zalando/patroni it's really solid and worked for us for a few years already. (it also comes with a haproxy config to have a single leader connection)
or for k8s their operator: https://github.com/zalando/postgres-operator https://github.com/zalando/postgres-operator (docker image: https://github.com/zalando/spilo https://github.com/zalando/spilo) we've also tried other operators which were easier to get started, but they failed miserably (crunchyrolls operator is basically based on the zalando one)
- urza 3y agoHow does patroni can do some self healing after primary db gets down and then up again? Or is manual intervention required? How does it look?
- merb 3y agomanual intervention is not required. Patroni will just use a Standby as the new master. If the old master will be alive again it will be started as a backup. Of course there might be dataloss if it was used with async replication. Patroni has great docs for this here: https://patroni.readthedocs.io/en/latest/replication_modes.html https://patroni.readthedocs.io/en/latest/replication_modes.h... (Actually this is more or less a thing to do with Postgres)