4 ms·
What's zalando/patroni's approach to performance scaling/load balancing? For example, pgpool2 can distribute SELECTs among multiple slaves which makes it useful
by geoka9 10y ago
What's zalando/patroni's approach to performance scaling/load balancing? For example, pgpool2 can distribute SELECTs among multiple slaves which makes it useful for heavy analytics loads. Can you guys do that, or you only handle HA?
- CyberDem0n 10y agoPatroni has REST API providing a health-checks for load-balancers. patroni:8008/replica will respond with http status code 200 only if node is running as replica. In the HAProxy config file you just need to list all Patroni nodes, specify a health-check and it will do a load-balancing for you. The same approach works for example with AWS ELB.
- geoka9 10y agoBut writes need to be directed to the master, right? Or Patroni is smart enough to do it by itself?
- CyberDem0n 10y agoCorrect. Writes need to be directed to master. May be not only writes but some reads as well. Only application can know which statement can be executed on replicas and which must be executed on master.