----------------original message-----------------
De: "Baptiste" [email protected]
A: "Emeric BRUN" [email protected]
Copie à: [email protected]
Date: Tue, 14 May 2013 07:55:22 +0200
-------------------------------------------------
 
 
> 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.

Sorry i miss that.

But i'm sur cookie persistance match is prior on stick table rules, so if a
cookie is cookie is match the stick-match rules are not eval and the
expiration timestamp of the entry is not refreshed.
> 
> 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.
The use-server does not match a cookie but an url parameter. So we don't
care about cookie is present or not.

Regards,
Emeric
> 
> Baptiste
> 
> 
> On Tue, May 14, 2013 at 7:47 AM, Emeric BRUN [email protected] 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" [email protected]
>> A: "Rui Lu?s" [email protected]
>> Copie �: [email protected]
>> 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 [email protected] 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