Hi Emeric,

I'm sure it works.
We use the same trick for JSESSIONID cookie, and I can tell you it works.
That's why I said to Rui to allow the server to setup the cookie.

That said, I'm almost sure your trick doesn't work.
I'm pretty sure the cookie SERVERID has been removed by HAProxy when
use-server rules are evaluated.

Baptiste


On Tue, May 14, 2013 at 7:47 AM, Emeric BRUN <eb...@exceliance.fr> wrote:
>  Hi,
>
> I'am not sure the baptiste trick is usable.
>
> Please prefer use-server statement:
>
>  cookie SERVERID insert indirect nocache
>  use-server ip1 if { url_param(SERVERID) memtom1 }
>  use-server ip2 if { url_param(SERVERID) memtom2 }
>  server memtom1 ip1 check inter 5000 cookie memtom1
>  server memtom2 ip2 check inter 5000 cookie memtom2
>
> Regards,
> Emeric
>
> ----------------original message-----------------
> De: "Baptiste" bed...@gmail.com
> A: "Rui Lu�s" rui.l...@gmail.com
> Copie à: haproxy@formilux.org
> Date: Mon, 13 May 2013 23:01:08 +0200
> -------------------------------------------------
>
>
>> Hi Rui,
>>
>> This is normal: HAProxy can't store in a stick table headers it has
>> itself setup.
>> So the line
>> stick store-response set-cookie(SERVERID) table webservers_backend
>> will work only if the server set-up the cookie.
>>
>> If you manage your server to setup this cookie, it may work with the
>> configuration below:
>> stick store-response set-cookie(SERVERID) table webservers_backend
>> stick on cookie(SERVERID) table webservers_backend
>> stick on url_param(SERVERID) table webservers_backend
>>
>> HAProxy will first try to collect stickiness information from the
>> Cookie. If it can't find it, then it will look for the information in
>> the url parameter.
>>
>> Baptiste
>>
>>
>> On Mon, May 13, 2013 at 6:47 PM, Rui Lu�s rui.l...@gmail.com wrote:
>>> Good day.
>>> For a few days i am trying to use stick-table with cookies and url
>>> parameters because flash does not support cookies
>>> i have the following configuration:
>>>
>>> backend webservers_backend
>>>
>>> cookie SERVERID insert indirect nocache
>>>
>>> stick-table type string len 40 size 20k
>>> stick store-response set-cookie(SERVERID) table webservers_backend
>>> stick on url_param(SERVERID) table webservers_backend
>>>
>>> server memtom1 ip1 check inter 5000 cookie memtom1
>>> server memtom2 ip2 check inter 5000 cookie memtom2
>>>
>>> i also try other configurations.. however it does not work..
>>>
>>> the call from flash..
>>> getConfig?val1=xcv93ec9&SERVERID=memtom2;%20path=/
>>> i also try
>>> getConfig?val1=xcv93ec9&SERVERID=memtom2
>>>
>>> but it does not work for both..
>>>
>>> I am entering a dead lock...
>>> ------
>>> Give a man a fish and you feed him for a day. Teach him how to fish and
> you
>>> feed him for a lifetime.
>>
>>
>
>

Reply via email to