Hi Erik,

Forget about appsession, it's weak :)

Use haproxy 1.5-dev7 and stick tables. In your backend, just add the
few line below:
 stick-table type string len 32 size 10K
 stick store-response set-cookie(PHPSESSID)
 stick on url_param(session_id)

I recommand using with "peer" keyword to get multiple haproxy to sync
their tables.
So in case of reload of haproxy or in case of lb failure, you could
keep on redirecting users to the same backend.

cheers



On Wed, Dec 14, 2011 at 1:11 PM, Erik Torlen
<[email protected]> wrote:
> Hi,
>
> I am working with an application that does not use the cookie as a "normal" 
> application would do.
>
> Basically it receives PHPSESSID (currently two PHPSESSID is received, which I 
> would try to solve with their devs) and the returns the sessid as a query 
> string on every
> call it makes against the web application.
>
> Example.
> Step 1
>
> GET /login
> ...
> HTTP/1.1 200 OK
> ...
> Set-Cookie: PHPSESSID=m2b6m6rkp8l02lu5boflht2pq6; path=/
> ...
>
> Step 2
>
> GET /list/?session_id= m2b6m6rkp8l02lu5boflht2pq6
> ...
>
> HTTP/1.1 200 OK
> ...
>
>
> I tried using appsession for this like:
> "appsession session_id len 27 timeout 1h request-learn mode query-string"
>
> But that does not seem to work.
>
> I guess I need HAProxy to get the cookie value from the Set-Cookie header and 
> then keeping track of it using the query-string.
> Is that possible to do? If so, how is it done?
>
> /E

Reply via email to