Hi Willy,
On 20 June 2012 19:44, Willy Tarreau <
[email protected]> wrote:
> Hi Damien,
>
> On Wed, Jun 20, 2012 at 04:19:09PM +0100, Damien Churchill wrote:
>> I've found another place where the behaviour appears to diverge from
>> the documentation. At the beginning of section 4 it says that it's
>> mandatory that proxies with overlapping capabilities have different
>> names. My interpretation of that is that frontends can't have the same
>> name, and neither can backends, however a frontend may share a name
>> with a backend, is that correct? I ask as it seems I'm able to (at
>> least with 1.4.18) create multiple instances of front and backends
>> with overlapping names.
>>
>> Config extract:
>>
>> backend some-backend-name
>> balance roundrobin
>> timeout check 10000
>>
>> server localhost 127.0.0.1:80 weight 1 check inter 2000 fall 3
>> option httpchk HEAD / HTTP/1.1\r\nHost:localhost
>>
>> backend some-backend-name
>> balance roundrobin
>> timeout check 10000
>>
>> server localhost 127.0.0.1:80 weight 1 check inter 2000 fall 3
>> option httpchk HEAD / HTTP/1.1\r\nHost:localhost
>>
>> frontend test-frontend
>> bind :19001
>>
>> frontend test-frontend
>> bind :19002
>>
>> Is this me misinterpreting how things should work or something else going on?
>
> Your interpretation is right, but I think you didn't read the warnings
> that are emitted when starting the service :
>
> [WARNING] 171/204356 (2413) : Parsing [overlap.cfg:27]: backend 'some-backend-name' has same name as another backend (declared at overlap.cfg:20).
> [WARNING] 171/204356 (2413) : Parsing [overlap.cfg:37]: frontend 'test-frontend' has same name as another frontend (declared at overlap.cfg:34).
>
> Nothing prevents the config from working, but some features will not
> reliably work with such a conf (eg: ACLs referencing a backend name).
> Hence the warning.
>
Okay thanks, it's good to know the expected behaviour.
I see the warnings now, I had 'quiet' in the configuration which was
suppressing them, my mistake!
Thanks,
Damien