On 22.10.2009 17:49, Tsirkin Evgeny wrote: > Hi list! > I am configuring tomcat cluster in the following env. : > 2 servers having apache/mod_jk in front and tomcat 6 in the back end. > There _is_ a load balancer in front of all this, however the session > stickiness does not always works _and_ > there is always a question - what if one of the servers will be took out for > a while and the traffic redirected to > another one. > > However i have configured in the past multiple application (of the same > tomcat instance) > to site on different workers . > (I wanted a separated pool of tomcat thread with separate timeout etc. > configured for each application). > Since this is the same tomcat those applications site in the same <Engine> > But ,and here is the question, according to docs - I should configure my > <Engine> jvmRoute to be the same > as the worker's name ,but my Engine have several workers associated with it > !!! > If i understand correctly jvmRoute is used for session stickiness ,right? > Basically for my setup i think i can do without the jvmRoute at all ,since i > have an apache in front of every tomcat > separately, is that right?
No, if your load balancer does not implement session stickyness correctly - as you noted above - you need to let both Apache servers connect to all 6 Tomcats to be able to correct the erros done by the load balancer. You would typically assign 3 of the 6 Tomcats in the first Apache distance 0 and the other three distance 1, and vice versa in the other Apache. If you want to use multiple thread pools in the Tomcat instances, then you have to decouple worker names from jvmRoute. That's not a problem, because using the worker name for session stickyness is only the default behaviour of mod_jk. You can set the route attribute for the individual workers to the jvmRoute. E.g. Tomcat A has jvmRoute nodeA with pools on port 8009, 8109 and 8109. Tomcat B has jvmRoute nodeA with pools on port 8009, 8109 and 8109. ... mod_jk has workers wA0.port=8009 wA0.route=nodeA wA1.port=8109 wA1.route=nodeA wA2.port=8209 wA2.route=nodeA wB0.port=8009 wB0.route=nodeB wB1.port=8109 wB1.route=nodeB wB2.port=8209 wB2.route=nodeB ... Then you configure a load balancer worker l0 which uses wA0 and wB0 etc., another l1, which uses Wa1 and WB1 etc. and finally JkMount /myfirstapp|/* l0 JkMount /mysecondapp|/* l1 ... Hope that's understandable (and correct). Regards, Rainer --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org