you can use load-balancing-group attribute in mod_cluster subsystem configuration  to split your worker nodes into separate load balancing groups.
Note this has actually nothing to do with your clustering setup, it only tells the balancer that there are multiple discrete worker groups and that sessions created within one should be kept in it.
I'm convinced that this is what you are looking for.
 ha or full-ha profiles in domain or standalone-ha or standalone-full-ha in standalone mode with AS7 and WildFly. The same attribute for mod_cluster listener in Tomcat configuration is called loadBalancingGroup
Another way is to use different sessionid names (like MYSESSIONID instead JSESSIONID) and/or different balancers. Just configuration ;-)
Thanks Michal, Jean for your quick reply.
I configured the load-balancing-group attribute in mod_cluster subsystem configuration but, how can I send requests to specific one of these balancing groups?
What I want is to have multiple clusters of multiple jboss servers, each cluster balanced independently from the others, is that possible using only one instance of httpd?
The load must balanced intra cluster not inter cluster, that is between JBoss 1.1 and JBoss 1.2 and independently between JBoss 2.1 and JBoss 2.2.
Thanks in advance
I solved it with the following configuration:
<IfModule manager_module> Listen 127.0.0.1:6666 CreateBalancers 1 <VirtualHost 127.0.0.1:6666> <Location /> Order deny,allow Deny from all Allow from 127.0.0.1 </Location> ManagerBalancerName cluster1 KeepAliveTimeout 300 MaxKeepAliveRequests 0 EnableMCPMReceive <Location /mcm1> SetHandler mod_cluster-manager Order deny,allow Deny from all Allow from 127.0.0 </Location> ProxyPass / balancer://cluster1/ </VirtualHost> Listen 127.0.0.1:6667 <VirtualHost 127.0.0.1:6667> <Location /> Order deny,allow Deny from all Allow from 127.0.0.1 </Location> ProxyPass / balancer://cluster2/ ManagerBalancerName cluster2 KeepAliveTimeout 300 MaxKeepAliveRequests 0 EnableMCPMReceive </VirtualHost> </IfModule>
Lines 24 and 35 do what I want.
<mod-cluster-config advertise-socket="modcluster" connector="ajp" proxy-list="127.0.0.1:6666">
<mod-cluster-config advertise-socket="modcluster" connector="ajp" proxy-list="127.0.0.1:6667">
Is this configuration ok?
Mod_cluster documentation does not explain what ProxyPass directive do, or I didn't find it.
I suppose "ProxyPass / balancer://cluster1/" says that all request sent to / must be redirected to the (balanced) cluster 1, I am right?
Does Leandro's solution work in practice? Anybody tried this one?