HP-UX OSRA for Web Services 2.5 Blueprint and Configuration Guide
Session Replication in Tomcat
Session replication in the Tomcat server is an all-to-all replication of session state, meaning the
session attributes are propagated to all cluster members all the time. This algorithm is efficient
with small clusters.
There are three types of session replication mechanisms in Tomcat:
• Using in-memory replication with the SimpleTcpCluster (in the org.apache.catalina.cluster.tcp
package) that ships with Tomcat 5 (in server/lib/catalina-cluster.jar).
• Saving the session to a shared database (org.apache.catalina.session.JDBCStore). For more
information, see the server.xml directive
<StoreclassName="org.apache.catalina.session.JDBCStore">.
• Saving the session state to a shared file system (org.apache.catalina.session.FileStore, part
of catalina-optional.jar).
Horizontal Scaling of Web and Application Servers
Horizontal scaling involves configuring multiple servers, with each running either the web or
application server software, and distributing the work across multiple servers. Vertical scaling
involves adding multiple instances of an application to a single server and distributing the
workload among the instances of the application.
Horizontal scaling provides increased throughput and provides failover support. This topology
lets you handle application server process failure and hardware failure without significant
interruption to client services.
In a horizontally scaled configuration, you can use the following load balancing techniques to
optimize the distribution of client requests:
• Hardware load balancing; Add an additional server to act as the load balancer.
• DNS; Load balancing is provided by software included with the HP-UX operating system.
• Apache mod_jk; Load balancing is provided by a software module included with the HP
Web Server Suite.
The following sections provide information about each of these load balancing techniques.
Hardware Load Balancing
In high traffic situations, a hardware load balancer provides the best performance. Figure 3-1
illustrates a hardware load balancer distributing client requests to a cluster of two application
servers.
26 Load Balancing and Cluster Configuration