42.3. Session Replication at the Web Level

This section shows you how to configure Apache, Tomcat, and JOnAS to run the following architecture:

Figure 42-3. Session Replication

The term session replication is used when the current service state is being replicated across multiple application instances. Session replication occurs when the information stored in an HttpSession is replicated from, in this example, one Servlet engine instance to another. This could be data such as items contained in a shopping cart or information being entered on an insurance application. Anything being stored in the session must be replicated for the service to failover without a disruption.

The solution chosen for achieving Session replication is called all-to-all replication. Tomcat uses a proprietary protocol based on TCP for the all-to-all replication.

The follow describes the steps for achieving Session replication with JOnAS.

42.3.1. Running your Web Application

The web application is now ready to run in the cluster:

  1. Start the JOnAS servers:

    service jonas start
  2. Restart Apache: /usr/local/apache2/bin/apachectl restart

  3. Use a browser to access the welcome page, usually index.html