Make Load Balancer HA

I like really much Load Balancer feature on racker with HA proxy, but i would like to know if is possible to make load balancer without a single failure point, like two same loadbalancer that in case of failure of the first one, will go into the second one, example:

+load balancer 1
+load balancer 2 (works only in case of load balancer 1 failure)

How i can accomplish something like this? Is it possible with rancher?

You can set the scale of the balancer service to more than one:

This will run the balancer containers on 3 hosts. From inside Rancher, any other service can link to this load balancer; that name will resolve to the IP addresses of all of the balancer containers (and the client will automatically pick one).

To use the balancer for something publicly accessible, you need a DNS entry that resolves to the public IPs of the hosts that the containers are on. And to make it reliable, an IP needs to be updated if one of the hosts or containers goes bad and is rescheduled elsewhere. It is possible to automate this today through the API; in the future we plan on making this easier with something like a webhook for you to update your DNS provider, and/or directly managed support for something common like Amazon Route53.

1 Like

Nice Vincent, thank you for the answer, i will try this night and let you know :smile:

I’m going with having a set of hosts that I place my Rancher LBs on (EC2 instances for me), then I create an ELB in AWS and attach these instances to it and I set my DNS to point to the ELB.

So for public access, I can provide a DNS which routes to an AWS ELB, which then forwards the request to any of the Rancher hosts that are running LBs.
There is still some automated tasks that happen here, but what I’m thinking is I can create an ASG that creates rancher hosts that have a label and then when I create LBs in Rancher, specify that they must run on a host with that label.

Yes that should work; you’d want the global option (“Always run one instance of this container on every host”) instead of a fixed scale, so that the balancer runs on all of the hosts with that label and gets automatically added when a new host appears.

yes, this is also my idea on my clustering environment, my unique limitation is docker:
sometimes crash, other times loosing its own storage partitions… so many bugs and too much verbosity.
for this reason tools like rancher can save our life