Clustering web applications

The configuration of a clustered web application is broken into two steps:

  • The load balancer configuration
  • The session replication configuration

Here, we suppose that you have correctly installed Apache Web Server and mod_jk as described in the previous chapter. Therefore, we will just highlight what is needed to adapt the configuration to our specific example, the AppStore.

First, specify the mount point that will be passed to mod_jk:

JkMount /ClusteredAppStoreWeb/* loadbalancer

Then, in the workers.properties, detail the list of nodes:

# Define nodeA worker.nodeA.port=8009 worker.nodeA.host=192.168.10.1 worker.nodeA.type=ajp13 worker.nodeA.lbfactor=1 # Define nodeB worker.nodeB.port=8009 worker.nodeB.host=192.168.10.2 ...

Get JBoss AS 5 Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.