News for hackers. Stuff that matters.
Re:Patroni: A Template for PostgreSQL HA with ZooKeeper, Etc... by CyberDem0n on Friday April 14, 2017 @06:42AM (#14113661)
Doesn't HAProxy provide such functionality? Patroni has REST API which can be used by HAProxy for a health-check.

patroni:8008/master will return http status code 200 only if the node running as elected master

patroni:8008/replica will return http status code 200 if node running as replica.

And final missing bit is a automation of generation of haproxy.cfg - it could be done with confd: https://github.com/kelseyhightower/confd

And here is an example of template file: https://github.com/zalando/patroni/blob/master/extras/confd/...

Re:Patroni: A Template for PostgreSQL HA with ZooKeeper, Etc... by vishesh92 on Friday April 14, 2017 @06:48AM (#14113674)
I am not sure, will HAProxy forcibly close connections to old master in case of a failover?
Re:Patroni: A Template for PostgreSQL HA with ZooKeeper, Etc... by CyberDem0n on Friday April 14, 2017 @06:55AM (#14113699)
on-marked-down shutdown-sessions

should do the trick