4 ms·
Thanks for this. As I mentioned in previous comment, I couldn't find much about Stolon. One of things I likee in stolon is the proxy, it enforce connections to
by vishesh92 10y ago
Thanks for this. As I mentioned in previous comment, I couldn't find much about Stolon.
One of things I likee in stolon is the proxy, it enforce connections to the right PostgreSQL master and forcibly closes connections to unelected masters. Which is not present in Patroni, but I guess it should be doable using consul's service discovery and dynamic DNS. (I am not sure if this can be done using etcd and zookeper).
- CyberDem0n 10y agoDoesn'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 https://github.com/kelseyhightower/confd And here is an example of template file: https://github.com/zalando/patroni/blob/master/extras/confd/templates/haproxy.tmpl https://github.com/zalando/patroni/blob/master/extras/confd/...
- vishesh92 10y agoI am not sure, will HAProxy forcibly close connections to old master in case of a failover?
- CyberDem0n 10y agoon-marked-down shutdown-sessions should do the trick
- deleted 10y ago[deleted]