I've been able to do so with both Jetty (both implementation), tomcat . Show you mod_jk2 config file.
I have a 4 node cluster running with JBoss 3.0.7 w/ Tomcat that supports session distribution and session affinity.
I struggled with Jetty around the 3.0.1 - 3.0.3 version to get it to work, but eventually gave up and used the
Tomcat version and it has worked fine ever since.
To get this to work, under Tomcat, just mark your app distributable, add a unique JVMroute to each coyote definition and configure JK to use sticky sessions.
I know Jules was working towards getting Jetty to support this but I am not sure how far long he is with it.
My workers2.properties is posted below. www3 and www4 are boxes with 2 instances running each. With this current configuration, the same session's requests will be evenly balanced across all 4 instances rather than sticking to just one. My web applications are marked as and I'm using Jetty's JGStore for session replication.
info=Maps the requests. Options: debug
info=Scoreboard. Required for reconfiguration and status with multiprocess servers
info=Global server options
info=Default load balancer.
info=Status worker, displays runtime informations
info=Display status information and checks the config file for changes.
FYI, here is my post to the Jetty list. Interesting that you've gotten it to work because Jules doesn't think it should be able to.
>Below you say:
>"You currently have to choose EITHER session affinity OR distribution
>NOT both - the DistributableSessionManager does not yet support
>I want session distribution for failover support. However, session
>affinity is also import for my app server (JBoss) to use entity EJB
>caching efficiently (i.e. the ConsumerEJB is only cached on the
>instance you're "stuck" to rather than on every instance). You used
>the word "yet" above implying that the DistributableSessionManager
>will suport both of these features in the future. Is there any kind
>of timetable for this? Thanks.
I will start on a major reiteration of this code in about 6 weeks - as
soon as my current contract ends. Cobining these two features will be a
This is the (only) file that is interesting...:
Please, could you show us your workers2.properties?
The one that supports boath Session Distribution AND Session Affinity.
Can anybody check my workers2.properties file.