I have an e-commerce application running on Tomcat 7 & IIS 7. The souce-code is pretty large, so my overall goal is to implement some load-balancing with a minimum of change to the code. The best possible solution would be through 100% re-configuration of the servers themselves.
My 10,000-foot view would look like this:
[Load balancer]
/ | \
[Tomcat #1] [Tomcat #2] [Tomcat #3]
\ | /
[Hibernate cache]
|
[Database Server]
Note 1: from past load-balancing attempts customers originating from AoL lose their session (where our shopping cart is stored) even with load-balancing configured to “sticky sessions”
Note 2: e-commerce app uses JBoss 1.3 for its transactional support
I am stuck on two key points:
- Configuring Tomcat to replicate session states among 2 or more servers (see “Note 1”)
- Configuring Hibernate to use the same cache on all Tomcat servers
Any links that hit on either of these two points would be appreciated.
P.S. My attempts at finding info myself via Google aren’t turning up anything helpful. Am I using the wrong terms to describe my solution?
Regarding (1)
Im assuming you’ve read the Tomcat Cluster basics and followed the steps in the How-To?
It is followed by the 3 methods of session replication and your choice of
DeltaManagerorBackupManagerin your Cluster. For a small Cluster of 3 servers,DeltaManagershould work.If there is a loss of sticky sessions at the LB, is it under high load or always occurring?
IMHO, moving to replication is memory-intensive so you should try to attack the problem at the root, i.e. the LB
and for (2) does the JBoss TreeCache help?