Hi Baptiste your comment about "peer" was interesting. I am wondering if it can 
be used in conjunction with a SLB in Amazon. Here is what I am thinking.


Amazon SLB/ELB is setup in pass thru the send the requests as is to backend 
HAProxies. 
HAProxyies peer using internal IP or assigned static IP
If a proxy receives a request for which session is on the other server, it 
forwards the request back to main IP of the SLB/ELB.

Is that doable? I am going to read up on "peer" option once I am back home. But 
if the above can be done, lots of headache in making HAprxoy itself HA goes 
away.

Thanks
Mir


On Dec 14, 2011, at 8:24 AM, Baptiste wrote:

> 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