on our wf8.2 server the web-app have two http endpoints: on port 8080 to regular http requests; and on port 37304 to "special" user requests in protected area.
Sounds like you can do this by creating 2 separate virtual hosts in your httpd configuration, e.g.
Listen 8080 <VirtualHost localhost:8080> ManagerBalancerName public ... </VirtualHost> Listen 37304 <VirtualHost localhost:37304> ManagerBalancerName private ... </VirtualHost>
In this case both virtual hosts will balance requests to _only one_ undertow listener, which has been specified in mod-cluster-config. Even though i specified two balancers in httpd.conf.
IIUC you want to use different Undertow listeners for different hosts with different contexts registered with different load-balancers. That would need quite a bit of changes. So configuration would look something like this:
<mod-cluster-config connector="ajp" excluded-contexts="a b c"/>
<mod-cluster-config connector="http" excluded-contexts="d e f" advertise-socket="modcluster2"/>
Does that solve your use case?
For anyone coming here for a solution, let me note here that this does not work with the current implementation, this is just suggestion how this could be addressed when WFLY-5884 is implemented.
Yeah, if it will be possible to add more than one mod-cluster-config section, this will solve my UC.
Basically you need 2 mod_cluster subsystem in the same application server, I can't how to get that working right now.
What you can do is to use mod_proxy_balancer and having one balancer in each VirtualHost like
... (using another balancer private with 2 members going to private port)
That's what I did, but we wanna mod_cluster exactly, because it allows to use custom loadfactor metrics.