On Sat, May 12, 2012 at 10:25:58AM -0500, Andres Thomas Stivalet wrote: > Hi Willy, > > I believe in previous versions of haproxy having an unresolvable host > name at start up did not cause haproxy to error out. Bellow is the > change log I found: > > 2010/03/30 : 1.3.24 > - [BUG] config: report unresolvable host names as errors > > I wrongly assumed that haproxy performed DNS lookups after startup.
In fact the bug above was a regression which made some host names to be reported as 0.0.0.0 under some conditions. > After reading the past few emails I'm assuming that haproxy, on > startup, performs a lookup for backends' hostnames, gets an IP > address, and stores this IP for later use. If there is no IP, haproxy > errors out, and haproxy does not perform DNS lookups other than at > startup. That's exactly how it works. > It completely makes sense for static configurations, but it does limit > haproxy in its application. In theory it should not. Some new use cases have appeared with infrastructures such as EC2 where servers are dynamic, but to be honnest, we should also mention that running on random IP addresses causes a number of other issues such as traffic from old sites to be sent to yours because the IP you're using was recently assigned to another site and the entry is still cached (already experienced this, it was not funny when the old IP was released because it was being DDoSed). > I think an option for the backend works perfectly because, as you > said, most people statically define their farms. Static is easier and > less complicated, but limited. Everything has it's pros and cons. That's why I've added this to the TODO list :-) Cheers, Willy

