Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spread VIPs across instances #84

Open
aneagoe opened this issue Dec 7, 2021 · 4 comments
Open

spread VIPs across instances #84

aneagoe opened this issue Dec 7, 2021 · 4 comments

Comments

@aneagoe
Copy link

aneagoe commented Dec 7, 2021

PR #53 already addresses this concern, but only partially. Its impact is, unfortunately, quite limited. It's quite rare that a service would have multiple VIPs such that they would be balanced.
The current shortcoming is that if one deploys keepalived-operator on OKD/Openshift 4.x, most VIPs would be colocated on a single node. This is especially problematic for services that require quorum, like kafka or mongodb with multiple instances. It's also affecting traffic scalability, as all traffic is mostly handled by a single node.
Ideally, by default, keepalived-operator would try to randomize the VIP distribution across the members. Further, it would be great if based on an annotation, some VIPs are kept on different members (for example, create an "anti-affinity" for kafka broker services, such that they are not placed on the same node).

@raffaelespazzoli
Copy link
Collaborator

raffaelespazzoli commented Dec 7, 2021 via email

@aneagoe
Copy link
Author

aneagoe commented Dec 7, 2021

I'm not sure what's the best way to approach this and I'm not very familiar with keepalived. However, the difficulty seems to be in how to manage/mount the keepalived configmap which holds the config. Say we have 3 VIPs and two replicas for the daemonset. Then, one node would be MASTER for 2 VIPs and one for 1 VIP. Now, if the daemonset is scaled to 3, the operator would reconfigure replicas such that each VIP is MASTER on a different node.
When it comes to the "anti-affinity" approach I mentioned earlier, the operator would try to ensure that VIPs associated with services labeled/annotated with a particular key would be spread across keepalived instances.
High level objectives would be to achieve a best-effort uniform spread of VIPs and provide some functionality to control which VIPs should not be placed on the same underlying node.

@raffaelespazzoli
Copy link
Collaborator

raffaelespazzoli commented Dec 7, 2021 via email

@aneagoe
Copy link
Author

aneagoe commented Dec 7, 2021

I'm already looking at options. Regardless of the bootstrap mechanism, if one goes through maintenance and does a rolling reboot of nodes, you'd end up with a situation where all VIPs are handled by a single node it seems.
Using track_file seems interesting, but atm I'm not sure what the simplest approach would be, without requiring complexity on the operator side. I'm still experimenting with that, I'll post back once I have something more concrete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants