vip-manager icon indicating copy to clipboard operation
vip-manager copied to clipboard

[Feature proposal] Support a "standby IP" in case of 3+ nodes

Open kmoppel opened this issue 4 years ago • 4 comments

Currently we can only "float around" a single primary IP...but in many cases also a secondary standby IP-s are needed to offload some traffic for example. In case of 2 total nodes this can be achieved somehow with some ugly "negate" hacking currently but with 3 nodes it will already become impossible as we need somekind of qorum.

Implementation idea: to piggyback on top of ETCD and introduce some new key like /service/batman/standbyleader that all standby nodes would like to grab and respond to.

kmoppel avatar Jan 25 '21 11:01 kmoppel

HI , In our case one master node and more standy nodes , master node is used for write ,standy nodes are used for read. applications not only need master but also need standys . Can this project support an api like is .

/masterip [10.10.10.1]

/standyips[10.10.10.2,10.10.10.3....]

by the way if support dns will more comfortable ,THANKS

EamonZhang avatar Feb 23 '21 03:02 EamonZhang

Dear @kmoppel and @EamonZhang , please understand first that vip-manager was always destined to be a KISS tool. That's why I think it is necessary to put a focus on very specific aspects.

What Kaarel describes would require an additional set of virtual IP addresses. And some additional work to figure out:

  • if there are more healthy replicas than virtual IPs, who's allowed to use the IPs?
  • if there are less healthy replicas than virtual IPs, some replicas need to use more than one IP, otherwise there will be traffic going to IPs that are not answered by anyone. Both of this requires extensive work that I would not like to put into vip-manager. Vip-manager has the primary goal of always keeping a VIP pointed at your cluster primary. Burdening it with additional bells and whistles seems like a step that might make it less dependable.

What Eamon describes sounds like it is already perfectly supported by HAProxy. I'm not sure what you want to do with DNS, but HAProxy supports adding arbitrary "backends" to serve connections to patroni, e.g. by taking a look at the patroni ReST API: https://github.com/zalando/patroni/blob/master/extras/confd/templates/haproxy.tmpl You can then enable round-robin or even "load balancing" based on the number of connections in HAProxy.

Let me know what you think.

markwort avatar Mar 02 '21 09:03 markwort

@markwort

As a service , user need unified access interface. there are many function

layer-2 network : VIP layer-4 network: IP+PORT e.g. haproxy
layer -7 network: DNS

As a application dns is both practical and useful of using

EamonZhang avatar Mar 04 '21 08:03 EamonZhang

📅 This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. ♻️ If you think there is new information allowing us to address the issue, please reopen it and provide us with updated details. 🤝 Thank you for your contributions.

github-actions[bot] avatar Aug 10 '22 11:08 github-actions[bot]