I have 3 tomcat servers where users get into all time. They are 3 because the processing of each request is heavy (lot of sql). Users enters to server 1 or 2 or 3. Now I want to make them "one". I know I need do clustering but, will clustering spread the requests thru the 3 servers or here is where I need implement load balancing with apache2 ?
|
You can use mod _ jk http://tomcat.apache.org/connectors-doc/ Remember to set sticky _ session on the mod _ jk and tomcat connector |
|||
|
|
|
You are going to be creating a virtual "one" machine that the outside of your "cluster" or load balanced architecture will only see as one actual machine. For example, you have one Real IP address (the outside routable IP) and 3 virtual IP's (the internal ip that the load balancer assigns) It also depends on how your application is put together. Does it have sessions? Is it stateful or not? Load balancers such as loadbalacer.org or kemp technologies can forward people with specific sessions to a specific server (A, B, or C) until the session ends and then may move them to another server for load balancing. The end result (users browser) doesn't care what server it is actually on, it only ever see's the one Real IP address and is sending session information in the hopes that it's request will be answered properly. Just that if it sends sessions information the server that the load balancer sends them to knows what it is and will route it, and distribute incoming user load accordingly. |
|||
|
|
|
Take a look at Teracotta for web sessions.
The web sessions tutorial lists five simple steps for you to make in order to evaluate the product ( FOSS ). |
|||
|
|