Open jberkus opened 7 years ago
thanks Josh, good stuff, we are about to fire up another dev round on the proxy and this is great input.
BTW, note that part of my use case involves disabling the proxy healthcheck, since I'll be using the Patroni healthcheck.
Is there any progress here? I would be interested in this feauture as well.
looking for a Postgres proxy with such option too, would be super useful.
To support an infrastructure where the list of PostgreSQL backends is being maintained by Kubernetes/Openshift, we need to support "hot" changes to the list of backends. That is, we need to be able to add new backends and remove old ones with proxy running, and only have it drop connections for the affected backends.
There's three primary cases we want to support here. All of these need to work via external commands, not just healthcheck, due to a need to support a system where there may be multiple proxies in the infra and an external service is controlling the list of nodes:
Pool growth: I increase the number of PostgreSQL replicas from 3 to 7. I should be able to add the additional 4 replicas to proxy without restarting, and have them receive (new) load-balanced connections as they are added.
Node removal: if I am removing nodes, either for pool shrinkage or because replicas have failed, I need to be able to do it without restarting proxy and without waiting for proxy itself to healthcheck out those nodes. Existing connections to other nodes should not be interrupted.
Master Failover: I need to be able to change which node is the master without restarting proxy. Only connections to the old master should be interrupted by this.