Universal load balancer for all stacks


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.


1 Like

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/

For the Universal Load Balancer use case, I believe the refactoring described in 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.

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

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.