Thanks for the reply, Cyril.  

Each Apache/Tomcat frontend has 1 apache instance communicating with 1 tomcat 
instance via mod_jk (ajp13).  I'm curious about jvmRoute - should I have it set 
in the tomcat configuration (and, if so, to what)?  Since HAproxy is doing the 
routing of requests, by the time it hits the frontend there is no more routing 
required so I don't have jvmRoute set... perhaps this is incorrect?  It does 
appear my request contains mod_jk-like appended server info to the jsessionid

"POST /app;jsessionid=813FD588059604BD3D519A11A0C1FA7B.10.250.54.70 HTTP/1.0"

I tried appsession len=32 but that did not work.  Also, I'd like to avoid 
balance url_param since appsession seems like the "proper" method for session 
affinity.

Thank you again for the suggestions and feedback.

Mike

-----Original Message-----
From: Cyril Bonté [mailto:cyril.bo...@free.fr] 
Sent: Tuesday, October 27, 2009 1:00 AM
To: Robinson, Michael
Cc: haproxy@formilux.org
Subject: Re: Sticky session, dumb client

Le mardi 27 octobre 2009 02:18:35, Robinson, Michael a écrit :
> I've got HAproxy 1.3.22 configured on two EC2 servers in front of two 
> Apache/Tomcat frontends serving a JSP-based mobile phone application.  

Does 1 apache instance can talk to 1 (and only 1) tomcat or can it talk to both 
tomcat ? How the communication is made between them (mod_jk, 
mod_proxy_ajp/http/balancer) ?


> The application requires session stickiness - I've tried every documented 
> alternative HAproxy offers for session persistence, unfortunately without 
> luck.  The mobile device (well, our application) does not support cookies and 
> will not echo a modified jsessionid cookie on subsequent requests.  Two 
> options seem ideal, but there are roadblocks:
> 
> 
> 1.     appsession jsessionid len 52 timeout 1h
> 
> However, since cookies aren't an option, we hoped to leverage appsession URL 
> lookup... which has the honor of being on the matrix of all known 
> bugs<http://haproxy.1wt.eu/knownbugs-1.3.html> posted on 10/18 (thanks for 
> posting this, BTW!)
> 
> Any ideas if/when this may make it into a stable release?

You should try with "len 32" if there's no jvmRoute in the tomcat configuration.

 > 2.     balance url_param jsessionid check_post
> 
> This option could work... but it doesn't (for me, at least).  Is the config 
> line wrong?  Here's an example HTTP request from our log file:
> 
> ... "POST /app; jsessionid=55A964502A7D0565A1C2ADE432AD3EF0 HTTP/1.1"
> 
> Can/should I just modify the source for url_param matching to look for ';' 
> instead of '?' as a workaround?

I don't think this will work as the hashed value of jsessionid won't necessarly 
point to the server that provided this session.

-- 
Cyril Bonté

Reply via email to