LoadBalancer & External world?

Hi all,

I have a question more about the philosophy on how i have to provide connectivity for the external world to an application running inside a container managed by Rancher.

Let’s say : I have 2 physical host that accepts containers, hostA and hostB.
I have an application based on 2 webservers, and i want that the outside world can reach and contact this application.

I can configure a loadbalancer that will balanced the traffic to my 2 webservers.
But this loadbalancer will be running either on hostA either on hostB… So my outside world would need to know where the load balancer is running in order to connect to it…?
In some case it may be possible to configure it, but in some case it won’t (let say it’s users, i can’t ask them to try one host and then the other).

I was thinking on running the load balancer on all hosts… Or configuring labels and force the loadbalancer to run on a host with the specific label.
But being new to Rancher, i wonder if the community can gives me advices on the best way to deal with this.

How would you define this kind of infrastructure?

Regards,
Thanks

R.

Hi

There are a number of ways to do this, but what we do is run load balancers on all of our “frontend” hosts, and use the Route53 service from the Catalog to automatically update our DNS to point the DNS entry https.lb.production.example.com to the IP addresses of all hosts running the load balancers. Then we simply make any host name which should point to rancher to be a CNAME of https.lb.production.example.com.

We keep the TTL on the DNS entries at 60 seconds so if a server is added or removed within a minute the DNS will reflect that.

This way, DNS load balances the load balancers, which in turn load balance the actual services.

While we use Route53, the catalog contains similar services for other DNS providers.

Hope this helps.

-Barry Flanagan