On 11 March 2013 14:51, Nicolas G <gerbault.nico...@gmail.com> wrote:
> Willy Tarreau <w <at> 1wt.eu> writes:
>> Not convinced at all because I don't see how it solves all issues. And
>> I'm even less convinced it adds any value beyond passing the conf.d as
>> "-f" on the command line.
> How does HAProxy merge all the files? Does it follow the order of the 
> specified
> files? For example, if I have multiple defaults zones, will HAProxy configure 
> it
> correctly?

I don't know the answer to the first 2 questions, but the (very
useful) answer to the last question is that the scope of each defaults
section defined is "until another one is defined". This allows for
some really useful constructs such as defining an
HTTP-listener-appropriate defaults section, then your HTTP listeners,
then a TCP-listener-appropriate defaults section, and then your TCP
listeners. Willy pointed this out a few months ago, FWIW. Well - that
was when I noticed it first, anyway :-)

So whatever order the multiple -f's result in HAProxy seeing, the
resulting config /should/ obey what I wrote above. I suspect that a
useful construct might be

$ haproxy -f conf/http-defaults -f conf/http-listeners -f
conf/tcp-defaults -f conf/tcp-listeners

HTH
Jonathan
-- 
Jonathan Matthews // Oxford, London, UK
http://www.jpluscplusm.com/contact.html

Reply via email to