Sun Cluster comes up with a concept of horizontal scalability for data services called scalable service, ip based load balancing algorithms are integrated in this concept. On behalf of this reason you can scale horizontally without using hardware loadbalancers. For a deeper discussion of this scalable service see the Sun Cluster Concepts Guide.
Before using the Sun Cluster HA for Apache Tomcat in a scalable configuration it is necessary to have a closer look on the infrastructure of the cluster and the clients.
If your clients access your application via proxies, you need to determine whether the used proxy stays the same during a session context. This can be guaranteed for an intranet, but it needs some investigation.
If the proxy changes during a session context it means, from the load balancing point of view, that the source ip address is changing. This will spoil every ip based load balancing, wether it is hardware or software.
Especially when your application is facing the internet, it is not guaranteed, that the source ip address remains the same during a session context.
Several options to solve this issue and get horizontal scalability from your Apache Tomcat are available.
Sun Cluster HA for Apache Tomcat can be configured two ways to get horizontal scalability.
Using Sun Cluster HA for Apache Tomcat in a purely scalable configuration.
Using Sun Cluster HA for Apache Tomcat in a multiple masters configuration.
Multiple masters configurations and scalable configurations are both configured as a scalable data service. The difference between the two configuration lies in the way of accessing the nodes.
A client accesses the scalable configuration via it's shared address. In this case Sun Cluster does the load balancing.
A client accesses a multiple masters configuration every via every nodes physical address. Load balancing needs to be done somewhere else.
For more information about scalable data services, see the Sun Cluster Concepts Guide.
Sun Cluster HA for Apache Tomcat as a scalable configuration
You can use Sun Cluster HA for Apache Tomcat in a scalable configuration if it is guaranteed, that the source ip address remains the same during a session context in example. in an intranet.
If the source ip address might change during a session context and scalable is the way to go, Apache Tomcat needs to be configured with session replication. This can be done by the application using a global file system or a database.
You will get a performance penalty from this approach.
It is much more performant to use Tomcats inbound memory session replication for this purpose.
You can achieve this for Apache Tomcat 4.x by following the instructions at http://www.theserverside.com/resources/article.jsp?l=Tomcat.
Inbound memory session replication as a built in feature, is on the feature list Apache Tomcat 5.x.
For Apache Tomcat 3.x the inbound memory session replication is not configurable.
Sun Cluster HA for Apache Tomcat as a multiple master configuration
You can use Sun Cluster HA for Apache Tomcat in a multiple master configuration in the other scenarios. Be aware, that external load balancing is required. A typical configuration is using the scalable Apache webserver as a load balancer and configure one physical hostname of an Apache Tomcat instance behind each instance of the Apache Web server. An other option is to use a hardware loadbalancer which has to handle the session context.
The difference between scalable and multiple masters configuration is only in the way, the clients access the cluster nodes. In a scalable configuration they access the shared address, otherwise the clients accesses the physical hostnames. So from the Sun Cluster point of view there is no difference between the two configurations.