JBoss.orgCommunity Documentation
You need to load the modules that are needed for mod_cluster for example:
LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_ajp_module modules/mod_proxy_ajp.so LoadModule slotmem_module modules/mod_slotmem.so LoadModule manager_module modules/mod_manager.so LoadModule proxy_cluster_module modules/mod_proxy_cluster.so LoadModule advertise_module modules/mod_advertise.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
ProxyPass / balancer://mycluster1/
0: Create in all VirtualHosts defined in httpd.
2: Create only the main server.
UseAlias: Check that the Alias corresponds to the ServerName (See Host Name Aliases)
0: Don't (ignore Aliases)
1: Check it
Default: 0 Ignore the Alias information from the nodes.
LBstatusRecalTime:
Time interval in seconds for loadbalancing logic to recalculate the status of a node: (Default: 5 seconds)
The actual formula to recalculate the status of a node is:
status = lbstatus + (elected - oldelected) * 1000)/lbfactor;
lbfactor is received for the node via STATUS messages.lbstatus is recalculated every LBstatusRecalTime seconds using the formula:
lbstatus = (elected - oldelected) * 1000)/lbfactor;
elected is the number of time the worker was elected.oldelected is elected last time the lbstatus was recalculated.The node with the lowest status is selected. Nodes with lbfactor ≤ 0 are skipped by the both calculation logic.
ProxyPassMatch/ProxyPass: ProxyPassMatch and ProxyPass are mod_proxy directives that when using ! (instead the back-end url) prevent to reverse-proxy in the path. This could be used allow httpd to serve static information like images.
ProxyPassMatch ^(/.*\.gif)$ !
The above for example will allow httpd to server directly the .gif files.
Maxnode: That is the number max nodes supported by mod_cluster. (Context: server config) Default: 20
<Location /mod_cluster-manager> SetHandler mod_cluster-manager Order deny,allow Deny from all Allow from 127.0.0.1 </Location>
When accessing the location you define in httpd.conf you get something like:
Transferred: Corresponds to the POST data send to the back-end server.
ServerAdvertise On http://hostname:port: Tell the hostname and port to use. Only needed if the VirtualHost is not defined correctly, if the VirtualHost is a Name-based Virtual Host or when VirtualHost is not used.
ServerAdvertise Off: Don't use the advertise mechanism.
Default: Off. (Any Advertise directive in a VirtualHost sets it to On in the VirtualHost)
AdvertiseGroup IP:port: That is the multicast address to use (something like 232.0.0.2:8888 for example). IP should correspond to AdvertiseGroupAddress and port to AdvertisePort in the JBoss AS/JBossWeb/Tomcat configuration. Note that if JBoss AS is used and the -u startup switch is included in the AS startup command, the default AdvertiseGroupAddress is the value passed via the -u. Default: 224.0.1.105:23364. If port is missing the default port will be used: 23364.
AdvertiseFrequency seconds[.miliseconds]: Time between the multicast messages advertising the IP and port. Default: 10 Ten seconds.
AdvertiseSecurityKey value: key string to identify the mod_cluster in JBossWEB. Default: No default value. Information not sent.
AdvertiseManagerUrl value: Not used in this version (It is sent in the X-Manager-Url: value header). That is the URL that JBoss AS/JBossWeb/Tomcat should use to send information to mod_cluster. Default: No default value. Information not sent.
AdvertiseBindAddress IP:port: That is the address and port httpd is bind to send the multicast messages. This allow to specify an address on multi IP address boxes. Default: 0.0.0.0:23364