Java Reference
In-Depth Information
•
mod_manager
: This module reads the information from AS 7 and updates the
shared memory information in conjunction with
mod_slotmem
•
mod_proxy_cluster
: This module contains the balancer for
mod_proxy
•
mod_advertise
: This is an additional module that allows HTTP to advertise
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 configur-
ation:
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 that your
Apache web server listens for requests and the port value of
8888
with the one you want
to use to communicate with WildFly.
As it is, the Apache virtual host allows you to have incoming requests from the subnet-
work
192.168.10
.
The
KeepAliveTimeout
directive allows you to reuse the same connection within 60
seconds. The number of requests per connection is unlimited since we are setting
MaxKeepAliveRequests
to
0
. The
ManagerBalancerName
directive provides
the balancer name for your cluster (defaults to
mycluster
).
What's most important for us is the
ServerAdvertise
directive that is set to
On
and
uses the advertise mechanism to tell WildFly whom it should send the cluster information
to.