On 23/11/2010 23:34, André Warnier wrote: > Andrew Hole wrote: >> I'm reading about domain directive in worker properties. I can setup >> different workers to be in the same domain (p.e. a machine) and have >> "domain >> affinity". Do you have some idea how it really works? >> > > No, but it kind of sounds like what you want to achieve, doesn't it ? > You could try it, and see how it goes. > It sounds like you would need to add one directive to each worker, like > > worker.tomcatA.domain=machine1 > worker.tomcatB.domain=machine1 > > worker.tomcatC.domain=machine2 > worker.tomcatD.domain=machine2 > > and it would then balance between machine1 and machine2, instead of > between the workers themselves. But it also sounds like tomcatA and > tomcatB would have to be configured as a "cluster", and have some > provision to share and replicate sessions between them. That may be > more work than you're aiming for. > > (I'm not sure, just guessing).
That isn't going to help keep sessions for app1 and sessions for app2 on the same machine since httpd/IIS treats each application independently. What it will do is require you to have clustering using the delta manager (all sessions replicated to all nodes) working across all of the nodes on a machine. That adds a lot of overhead for little benefit and requires all applications are installed on every node. Again, you'll need to look at an alternative LB approach. I've already mentioned the client IP based approach. The other approach is adding your own cookie (with path =/ so it applies to all apps) that you use to make the LB sticky to a machine. You'll need to do a little config in httpd.conf but it is quite simple. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org