On 2 April 2012 19:28, Sameh Ghane <sa...@anthologeek.net> wrote:
> Le (On) Mon, Apr 02, 2012 at 06:32:31PM +0100, Jonathan Matthews ecrivit 
> (wrote):
>> On 2 April 2012 17:25, Sameh Ghane <sameh+s...@anthologeek.net> wrote:
>> >
>> > Is there anything I missed ? Like setting a specific request header which 
>> > would
>> > be the result of a regexp on the URI, and balancing on that header ?
>>
>> I don't understand what you've written. Could you say it again, but 
>> differently?
>> Some examples would probably help too.
>
> Sorry for this.
>
> Imagine I see requests for /xxxxx/yyyyyy.zzzzz and I would like to balance
> according to the URI, though I don't want the "yyyyy" part to be fed to the 
> hash
> function. As far as I understand, it cannot be done with 'balance uri'.

Not simply, no, I don't believe so.

> That's why I would like to know if it can be circumvented through something
> like:
>
> backend be
> ..
> reqadd  balhdr:\ xxx
> balance hdr(balhdr)
> ..

I don't understand what you're trying to express there. You can
definitely balance according to any header you like, but I guess
you're trying to hack something in there with "balance hdr". I just
don't quite understand what it is.

Regardless of my miscomprehension, there's probably some way to
achieve what you want that others on list can help you with. Probably
some hacky combination of "reqrep" and some other req* commands. I
must admit I can't visualise the point you're trying to end up at,
given that your design *has* to be able to cope with back-end servers
going down, hence the balancing strategy can only really be an aid to
performance and not an immutable part of the correctness of the
solution.

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

Reply via email to