Java Reference
In-Depth Information
Each of these modules covers an important aspect of load balancing, listed as fol-
lows:
•
mod_proxy
and
mod_proxy_ajp
: These are the core modules that for-
ward requests to cluster nodes using either the HTTP/HTTPS protocol or
the AJP protocol.
•
mod_manager
: This module reads the information from AS 7 and up-
dates the shared memory information in conjunction with
mod_slotmem
.
The
mod_proxy_cluster
module is the module that contains the bal-
ancer for
mod_proxy
.
•
mod_advertise
: This is an additional module that allows httpd to aad-
vertise via multicast packets—the IP and port—where the
mod_cluster
module is listening.
The next part of the configuration that we need to add is the core load balancing con-
figuration:
Listen 192.168.10.1:8888
<VirtualHost 192.168.10.1:8888>
<Location />
Order deny,allow
Deny from all
Allow from 192.168.10.
</Location>
KeepAliveTimeout 60
MaxKeepAliveRequests 0
ManagerBalancerName mycluster
ServerAdvertise On
</VirtualHost>
Basically, you have to replace the
192.168.10.1
IP address with the one where
your Apache web server listens for requests, and replace the port value of
8888
with
the one you want to use for communicating with JBoss AS.
As it is, the Apache virtual host allows incoming requests from the subnetwork
192.168.10
.