I'm trying to setup an environment where I have two app servers and a
load balancer all serving one application on two unique ports (80 and
81) where I want the session data to be identical between all four
instances of the application.

************************    ************************
* Box 2                *    * Box 3                *
*  1 - App A / port 80 *    *  3 - App A / port 80 *
*  2 - App A / port 81 *    *  4 - App A / port 81 *
************************    ************************
                 |              |
                 |              |
           *****************************
           * Box 1                     *
           *  - loadbalancer (port 80) *
           *  - loadbalancer (port 81) *
           *****************************

My config consist of two <web-site/> declarations for each app server
where the default-web-app is the application to be shared. The attribute
shared=true is set on both the port 80 and port 81 web-site configs. The
appropriate frontend host/port is also configured for each web-site
definition as well as server.xml knows about both web-sites. From here
I'm not sure on the accuracy of my approach to clustering the two app
servers. In the web-site config for instance 1 and instance 3 (see above
for instances) are configured to use cluster-island=1 and instance 2 and
instance 4 are configured to use cluster-island=2. The loadbalancer
listening to port 80 is configured only to listen to cluster-island 1
where the load balancer for port 81 is using cluster-island 2. All apps
are distributable and all orion-web.xml have <cluster-config/> set.

With this setup when a request comes into port 80 and is assigned to box
2 / instance 1 and sets a session value; then the same client then
switches to port 81 and get assigned box 3 / instance 4 the session
value is not set. However if the client sets a session value on instance
1 and then goes to instance 2 or instance 3 the session value is
accessible.

Where did I go wrong? Is there another way to do this, if it's even
possible?

Thank,
- Mike


Reply via email to