-
2. Re: how i can integrate mod_cluster with wildfly such way that load-balancing will be on more than one port?
rhusar Dec 1, 2015 4:22 PM (in response to kostd)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>
-
3. Re: how i can integrate mod_cluster with wildfly such way that load-balancing will be on more than one port?
kostd Dec 2, 2015 7:20 AM (in response to rhusar)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.
-
4. Re: how i can integrate mod_cluster with wildfly such way that load-balancing will be on more than one port?
rhusar Jan 18, 2016 1:46 PM (in response to kostd)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:
<subsystem xmlns="urn:jboss:domain:modcluster:3.0">
<mod-cluster-config connector="ajp" excluded-contexts="a b c"/><mod-cluster-config connector="http" excluded-contexts="d e f" advertise-socket="modcluster2"/>
</subsystem>
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.
-
5. Re: how i can integrate mod_cluster with wildfly such way that load-balancing will be on more than one port?
kostd Jan 6, 2016 12:01 PM (in response to rhusar)Yeah, if it will be possible to add more than one mod-cluster-config section, this will solve my UC.
-
6. Re: how i can integrate mod_cluster with wildfly such way that load-balancing will be on more than one port?
jfclere Jan 6, 2016 12:30 PM (in response to kostd)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
<VirtualHost localhost:8080>
<Proxy balancer://public>
BalancerMember http://node1:8080
BalancerMember http://node2:8080
</Proxy>
ProxyPass / balancer://public</VirtualHost>
<VirtualHost localhost:37304>
... (using another balancer private with 2 members going to private port)
</VirtualHost>
-
7. Re: how i can integrate mod_cluster with wildfly such way that load-balancing will be on more than one port?
kostd Jan 6, 2016 3:09 PM (in response to jfclere)That's what I did, but we wanna mod_cluster exactly, because it allows to use custom loadfactor metrics.