# Universal load balancer for all stacks

**URL:** <https://forums.suse.com/t/universal-load-balancer-for-all-stacks/3578>\
**Category:** Rancher 1.x\
**Created:** [July 29, 2016, 9:50am UTC](https://forums.suse.com/t/universal-load-balancer-for-all-stacks/3578 "2016-07-29T09:50:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![peceka](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@peceka](https://forums.suse.com/u/peceka)\
**Post date:** [July 29, 2016, 9:50am UTC](https://forums.suse.com/t/universal-load-balancer-for-all-stacks/3578/1 "2016-07-29T09:50:44Z")

</div>

Hi,

is it possible to create universal load balancer service, so when smbd creates stack with his own app it will be automaticly registered in LB with defined hostname/virtualhost/whatever? If so, please point me to some tutorial how can i achive such solution.

Regards,  
p.

---

<div class="post-metadata">

**Author:** ![demarant](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/demarant/32/497_2.png) [@demarant](https://forums.suse.com/u/demarant)\
**Post date:** [July 31, 2016, 8:59pm UTC](https://forums.suse.com/t/universal-load-balancer-for-all-stacks/3578/2 "2016-07-31T20:59:31Z")

</div>

@peceka  
there is no built-in universal load balancer in Rancher as you describe it. I wished the same.  
right now you need to do some manual steps i order to achieve a universal load balancer (per environment, so not really universal so that it spans all the environments). For example you can add a stack called “UniversalLB” where you add a single a Rancher Load Balancer service, which is basically an HA proxy where you can register your other front ends.  
here some examples [http://rancher.com/virtual-host-routing-using-rancher-load-balancer/](http://rancher.com/virtual-host-routing-using-rancher-load-balancer/)

For the Universal Load Balancer use case, I believe the refactoring described in [https://github.com/rancher/rancher/issues/2179](https://github.com/rancher/rancher/issues/2179) will make it much easier. For example it will be possible to register a service to an existing Load Balancer via a selector on the service UI. See Use Case 2 in the github link provided.

---

<div class="post-metadata">

**Author:** ![etlweather](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/etlweather/32/419_2.png) [@etlweather](https://forums.suse.com/u/etlweather)\
**Post date:** [August 3, 2016, 7:45pm UTC](https://forums.suse.com/t/universal-load-balancer-for-all-stacks/3578/3 "2016-08-03T19:45:33Z")

</div>

Check this: [https://github.com/nodeintegration/rancher-haproxy](https://github.com/nodeintegration/rancher-haproxy) - this guys is working on something that sounds like what you’re asking for.

---

<div class="post-metadata">

**Author:** ![EugenMayer](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/eugenmayer/32/1415_2.png) [@EugenMayer](https://forums.suse.com/u/EugenMayer)\
**Post date:** [August 5, 2016, 6:21pm UTC](https://forums.suse.com/t/universal-load-balancer-for-all-stacks/3578/4 "2016-08-05T18:21:30Z")

</div>

This is really needed a long time ago, to unify and simplify how catalogs shall handle host port exports ( not at all ) but rather tell the user or configure the “central HA” to map that port using a domain. Since this concept is not officially defined and there is no ensurance the HAproxy is used, catalogs do deploy their own httpd server, again and again, and do blow up on rebinding port 80 or 443 all day long.

This will make most of the catalogs useless for production, since even if you remove the host expose and define it in your HA, after version-upgrade that catalog, the expose on the host is back again.
