crunchy-proxy icon indicating copy to clipboard operation
crunchy-proxy copied to clipboard

Feature: live edit of list of backends

Open jberkus opened this issue 8 years ago • 4 comments

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:

  1. 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.

  2. 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.

  3. 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.

jberkus avatar Mar 16 '17 16:03 jberkus

thanks Josh, good stuff, we are about to fire up another dev round on the proxy and this is great input.

jmccormick2001 avatar Mar 18 '17 19:03 jmccormick2001

BTW, note that part of my use case involves disabling the proxy healthcheck, since I'll be using the Patroni healthcheck.

jberkus avatar Mar 19 '17 17:03 jberkus

Is there any progress here? I would be interested in this feauture as well.

eni23 avatar Sep 21 '17 09:09 eni23

looking for a Postgres proxy with such option too, would be super useful.

filipmnowak avatar Nov 11 '23 08:11 filipmnowak