One, why to cluster
The single app server is strong and has a bottle of energy, so let's take a look at the real scene below.
At the time the project was like this, Tomcat this section is called the Web Zone, inside with SPRING+WS, also installed a JBoss Rule engine guvnor5.x, all WS without service layer and no DAO layer.
And then app Zone this is WebLogic, the transfer is in spring RMI, and then app Zone is all service layer, DAO layer and database dealing.
The user side uses. NET, which is connected to WS and Web zone.
A long time, a lot of data, there is a problem.
Loader runner ran down, found that the Web zone this piece, APP server has been used to the limit. Because the customer money is not much, so the web zone at that time is 2 servers, and are all 32 bits, memory, there are 8GB, after testing the CPU loader is not high, but the throughput of the Web server side is always on, and the. NET client side response is getting slower.
Analysis of the reason: single tomcat can withstand the maximum load has been over, the single Tomcat throughput on this point, but also to bear the operation of Guvnor, Guvnor within hundreds of business rules to execute.
Another look at the other aspects of the Code, SQL tuning has reached the limit, so finally no way, customers are not willing to take money in memory and the new machine or to buy a WebLogic, can only choose, engage in Tomcat cluster.
II. Cluster classification
The logical architecture of the Tomcat cluster is the one above, and the key is that our production environment needs to plan our physical architecture as well.