# Host independent Loadbalancer

**URL:** <https://forums.suse.com/t/host-independent-loadbalancer/4689>\
**Category:** Rancher 1.x\
**Created:** [November 22, 2016, 9:06am UTC](https://forums.suse.com/t/host-independent-loadbalancer/4689 "2016-11-22T09:06:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pwFoo](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/pwfoo/32/2884_2.png) [@pwFoo](https://forums.suse.com/u/pwFoo)\
**Post date:** [November 22, 2016, 9:06am UTC](https://forums.suse.com/t/host-independent-loadbalancer/4689/1 "2016-11-22T09:06:29Z")

</div>

Hi,

I’m searching for a multi host LB solution to be not dependent on one docker / rancher host.  
I have an idea, but don’t know if it would possible or easy to do (with rancher).

I have one location with multiple hosts as rancher environment. The LB should be global / host independent, but have to proxy containers running on different hosts.

Instead of a HA setup I try to make it possible to run a single LB with a docker custom network (routed public ip address / subnet). If the current host of the LB is down, rancher server should start it at another host with the same routed, public ip address. So the LB should be move to a active host if the current host goes down.

Is such a solution possible or should I setup something like a Keepalived HA with VIP?

Regards

---

<div class="post-metadata">

**Author:** ![pwFoo](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/pwfoo/32/2884_2.png) [@pwFoo](https://forums.suse.com/u/pwFoo)\
**Post date:** [November 22, 2016, 10:16am UTC](https://forums.suse.com/t/host-independent-loadbalancer/4689/2 "2016-11-22T10:16:29Z")

</div>

In simple words:  
I’m searching for a solution to be independent from a single host. Backend containers running on hosts scheduled by Rancher, but the public ip address (resolved by DNS / running the LB) shouldn’t be host dependent.

---

<div class="post-metadata">

**Author:** ![sra](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/sra/32/1514_2.png) [@sra](https://forums.suse.com/u/sra)\
**Post date:** [November 22, 2016, 2:14pm UTC](https://forums.suse.com/t/host-independent-loadbalancer/4689/3 "2016-11-22T14:14:44Z")

</div>

I’m not entirely sure what you are asking, but if you schedule your rancher load balancer using the scheduling rules to run on every host, it works just fine. In our case we have AWS elastic load balancers in front of this and all the hosts are added as backends and traffic is routed properly and with high availability.

You can schedule the rancher load balancer to run on every host in the `Scheduling` tab in the GUI or using a label `io.rancher.scheduler.global=true` in the `docker-compose.yml` file.

---

<div class="post-metadata">

**Author:** ![pwFoo](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/pwfoo/32/2884_2.png) [@pwFoo](https://forums.suse.com/u/pwFoo)\
**Post date:** [November 22, 2016, 2:45pm UTC](https://forums.suse.com/t/host-independent-loadbalancer/4689/4 "2016-11-22T14:45:10Z")

</div>

I think I searching for such a solution, but with my bare metal servers.

> [@sra](#):
>
> In our case we have AWS elastic load balancers in front of this […]

The Rancher LB is host dependent (local public IP).  
It looks like I need to setup HA (i.e. Keepalived) and use VIP instead of the local host IP.

Example with a small setup:  
2 docker / rancher hosts running backend services which are published by a Rancher LB.

Host-A = LB-A → Backends running Host-A  
Host-B = LB-B → Backends running Host-B

But I need to build a HA LB

LB (VIP) → Backends Host-A and Host-B

The LB VIP is a public ip address reachable from outside (public transfer net).

---

<div class="post-metadata">

**Author:** ![SoreGums](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/soregums/32/1064_2.png) [@SoreGums](https://forums.suse.com/u/SoreGums)\
**Post date:** [November 24, 2016, 9:57am UTC](https://forums.suse.com/t/host-independent-loadbalancer/4689/5 "2016-11-24T09:57:28Z")

</div>

I’ve been hunting for this myself.

I’ve only been able to come up with the Keepalived + floating IP thing…

So for now I’m just setting up my thing without and once I get that all working I’ll tackle this keepalived approach and hopefully figure out something simple to manage 🙂

If it gets too hard to do it the docker way I’ll just spin up 2x VMs and do the bare metal way 😕
