= Apache HTTP Server dynamic load balancer = == Enabling mod_cluster == Detailed information about configuring mod_cluster can be found here: https://docs.modcluster.io/#httpd with some additional FAQ on: http://modcluster.io/faq/ Last but not least, we kindly invite you to join the discussion on: https://developer.jboss.org/en/mod_cluster == Disable proxy_balancer_module (required) == To enable mod_cluster you need to make sure you have proxy_balancer_module disabled. Please comment out the loading of proxy_balancer_module in /etc/httpd/conf/httpd.conf: # LoadModule proxy_balancer_module == Enable mod_cluster modules (required) == Next step is to load all required mod_cluster modules. Uncomment all LoadModule directives from /etc/httpd/conf.d/mod_cluster.conf file: LoadModule proxy_cluster_module modules/mod_proxy_cluster.so LoadModule cluster_slotmem_module modules/mod_cluster_slotmem.so LoadModule manager_module modules/mod_manager.so LoadModule advertise_module modules/mod_advertise.so Furthermore, mod_cluster needs proxy_module and proxy_ajp_module loaded for AJP transport to operate. Similarly it needs proxy_http_module loaded if one wishes to use HTTP transport instead of AJP. == Enabling mod_cluster manager (optional) == Mod_cluster manager is a simple monitoring and management tool that displays useful information about workers. To enable it you need to load the mod_manager module and call SetHandler for the selected context: <location mod_cluster_manager=""> SetHandler mod_cluster-manager </location> == Restart == Make sure you restart the httpd server after you apply these changes. See /etc/httpd/conf.d/mod_cluster.conf file for details on network configuration. = Tomcat workers = Simply add <listener classname="org.jboss.modcluster.container.catalina.standalone.ModClusterListener" advertise="true" stickysession="true" stickysessionforce="false" stickysessionremove="true"/> to /etc/tomcat/server.xml. You also need to set jvmRoute, i.e. the name of your worker: <engine name="Catalina" defaulthost="localhost" jvmroute="tomcat-worker-1"> Last but not least, on virtual machines, you might experience _very_ slow start of Tomcat due to lack of entrophy. For testing purposes, you might choose insecure random number provider: -Djava.security.egd=file:///dev/urandom to CATALINA_OPTS or /usr/libexec/tomcat/server = WildFly workers = mod_cluster is available as a subsystem in standalone-ha.xml. To enable it, set: WILDFLY_CONFIG=standalone-ha.xml in /etc/wildfly/wildfly.conf