Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Once you get Apache HTPP Server and mod_jk setup correctly.. You can test load balancing and failover by requesting the following urls on port 80 (Apache HTTP Server default port).

http://youhost/servlets-examples-cluster - non sticky request (no httpsession request) HttpSession not used, hence no sticky session http://youhost/servlets-examples-cluster/servlet/SessionExample - HttpSession used, hence sticky session (using httpsession and cookies)used

Sticky Session refers to the load balancer sending all requests for the same httpsession (indicated by a cookie or encodedUrl) to the same cluster member.

You can test failover by stopping one of the geronimo servers server that owns the sticky session and seeing that the next http request fails over will failover into the remaining servercluster member. The httpsession data from the previous requets should be recovered and displayed in the refreshed browser window.

Tips
When testing using a web browser, make sure that you erase cookies and cached pages between test cases. Browser caching causes confusion.
Make sure your application has the distributable attribute defined in web.xml
Make sure all cluster members are on the same physical subnet and that multicast broadcast is supported on the subnet.
Also, see http://tomcat.apache.org/tomcat-5.0-doc/cluster-howto.htmlImage Added for more information on tomcat clustering.

Special Acknowledgement to Jeff Genender for developing the Tomcat clustering GBeans for Geronimo.

Back Button Sample applications