Load Balancer across stacks

As I understand load balancing within Rancher, stacks may include a load balancer along with services. It is also possible for a load balancer in stack A to balance-load for services in stack B. There are generally, then a few options for load balancing:

  1. A load balancer per stack
  2. One load balancer for all stacks (e.g. a stack that consists of a load balancer)

What are the benefits of the per-stack load balancer over the single load balancer for all stacks?



It’s pretty much arbitrary since links can cross stacks…

In general you’d want to have all the services that make up a logical product/application/customer (whatever you’re deploying) in one stack, because the service graph, import/export/working with rancher-compose, etc are scoped to a stack.

But if for example you’re using layer-7 routing in a loadbalancer to route requests across many applications then it probably doesn’t really belong in any one application, so you might put that in it’s own stack.

I’d also add that you’ll run into issues if you try to run more than one load balancer per host using the same public port… for that reason we use a single load balancer per host for all stacks…

1 Like