On 3 May 2016 4:50 am, "Ellison Marks" <[email protected]> wrote: > > So, here's a potentially odd setup. We're trying to set haproxy to proxy to two separate auto-scaled groups of aws servers. The easiest way we can think of to do this is to have haproxy send traffic to two elbs, which will then balance across their respective server groups. The problem we're running into is that elbs work by pointing to DNS names. I know haproxy can work with this by using a resolvers section and referencing it on the server line, but I'm not sure if that handles a dns name that tries to do round robin dns. > > Basically, the elb dns name will generally return multiple records, to try and distribute client load across several elbs in several access zones. Is the server directive smart enough to create multiple balanced servers for one server line, if the resolved name returns multiple records?
AFAIK the answer is no. You will need something external to haproxy to dynamically update its configuration and reload upon changes. Good example is using consul-template. I use ansible to monitor for changes in the backend group and update the config but for sure there are many other ways including custom scripts etc. > > -- > Sincerely, > Ellison > > Ellison Marks > Scratchspace Inc. > (831) 621-7928 > http://www.scratchspace.com

