Can I use tomcat instead of Apache web server to load balance to a cluster of tomcats?
posted 5 years ago
At the minute I have the usual server set up of Apache web server sitting on top of two tomcats with Apache load balancing to the tomcats if require or serving static request when recieved.
The problem is I have to big a work load on the two tomcats and want to optimise the whole app.
I am looking to set up a new cluster of tomcats, each on a separate box, that do the one specific task which at the minute is killing the processor on the server box. I hope this will eliminate interference from database queries or other processes to optimise the speed of the over all application however small the improvement may be.
I have figured out that I can set up one box with tomcat and database to take all the database queries and processing of data which is not in the main worker cluster.
The problem then is how do I load balance the cluster at the same time as forwarding the parameters needed for the load heavy process by a stand alone tomcat?!
I have been bouncing a few ideas but not sure if they are even possible:
Can Tomcat Load Balance, does a module exist I see in earlier version some documentation on it?
Or can Apache Web server interact with the Database and Java classes to get the parameters then load balance, can anything be intergrated?
Or do I add the stand alone tomcat above the structure I have at the minute? i.e. 1st tomcat interacts with DB passes parameter to Apache which load balances to cluster of n tomcats
Thanks in advance for any help!! and hope it all makes sense!