I have got a Java Enterprise Web Application which utilizes Tomcat6+Struts+Hibernate+MySql. in the moment it's openly ready to go on one server. To be able to performance issues we ought to slowly move the application to some clustered atmosphere. Anyhow I wanna use Tomcat6 clustering as below:

  • A Lot Balancing machine together with a web server (Apache+mod_proxy) as front-finish
  • Some application server machines, each one of these managing a tomcat6 instance
  • A session management back-finish
  • And lastly a db server

something similar to this


The burden balancer machine receives all of the demands and with respect to the balancing formula redirects these to the particular tomacat6 machine. After doing the company part, the fact is came back towards the webserver and also at the finish towards the user. Within this scenario the leading-finish machine processes all of the demands and reactions so it would be a bottleneck reason for the applying.

In Apache Tomcat clustering, it is possible to method to load balancing mechanism and web servers? I am talking about placing a load balancer within the front-end and then leave the request/response processing part to multiple web servers.

Tomcat doesn't have support for clustering built-in. Ultimately the load balancer distributes demands, therefore the various Tomcat instances don't have to understand what is going on.

What you need to do would be to make certain your application are designed for it. For instance, you should be aware that caches could be stale.

Say instance 1 has object X in it's cache and X is modified with a request processed on instance 2. The cache in instance 2 is going to be correct, the cache from instance 1 is going to be stale now.

The answer is by using a cache which assists clustering or disable caching for instances which may be modified. But that does not matter to Tomcat.