> -----Original Message-----
> From: Rainer Jung [mailto:[EMAIL PROTECTED]
> Sent: Sunday, April 22, 2007 12:54 PM
> To: Tomcat Users List
> Subject: Re: Sticky sessions not changing servers
> 
> Please give details:
> 
> - software (apache, tomcat, mod_jk) and platform versions
> - relevant parts of configuration (Apache Jk*, workers.properties,
> Connectors and jvmRoute from server.xml)
> - maybe parts of the log files showing your activity
> 
> Please note:
> 
> Sticky sessions use routing identifiers to identify the target servers.
> A tomcat instance with a jvmRoute attribute will put the value of the
> jvmRoute attribute at the end of each session id, either in rewritten
> URLs or in the JSESSIONID cookie. In order to make stickyness work, you
> have to use an lb worker with mod_jk, and the names of the sub workers
> must coincide with the jvmRoute of the target tomcat (or you use the
> route attribute of the workers).

Is there still a restriction about worker names / jvmRoute containing the
"." character?  This got me the first time I set up a lb configuration, but
that was many years ago and I was using JK2 at the time.

Tim

> 
> Stickyness is default behaviour for lb workers. As I understand you,
> stickyness in the sense of "requests belonging to sessions always go to
> the tomcat instance that has the session" is OK for you, but if you send
> a request without a session, it doesn't get load balanced.
> 
> So your problem looks like you didn't correctly set up load balancing.
> If you don't send a session id (neither via URL rewriting nor via a
> cookie), your request should be really distributed via all sub workers
> of the lb worker whose name you used in your JkMount.
> 
> You can do a quick test by using the ab binary inside of your apache bin
> directory, like
> 
> ab -c 10 -n 1000 http://myserver:myport/myurl
> 
> and watch the request counters going up in the mod_jk status worker.
> 
> Regards,
> 
> Rainer
> 
> lightbulb432 wrote:
> > I realize that sticky sessions always send requests from the same
> session to
> > the same Tomcat instance. However, if my sample application isn't using
> a
> > session (i.e. no cookies, URL rewriting, or hidden form fields),
> wouldn't
> > every request be seen as a new session and distributed among Tomcats on
> a
> > per-request basis (because in this case a session only lasts one request
> > from the point of view of the servers).
> >
> > Of course once I've enabled some sort of session handling, then I'd
> expect
> > to see the behavior I see now. Correct me if I've misunderstood, but
> this is
> > why I believe I'm not seeing expected behavior and am likely doing
> something
> > wrong.
> >
> > Also, how might I view the load balancing of different sessions in
> action?
> > I've cleared cookies and opened up a new browser window (even though I
> don't
> > think it's necessary in this case because I'm not using sessions), but
> it
> > still goes back to the same server.
> >
> > Any thoughts? Thanks.
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to