Saturday, 15 June 2013

jboss - Load balancing in mod cluster is not working -



jboss - Load balancing in mod cluster is not working -

i have jboss server in linux boxes. , configured apache server in windows machine. able see jboss server nodes in modcluster manager console. have deployed 1 camel application on jboss servers. , have done performance test 2,4,6 nodes. there no performance difference.......

find jboss configuration

<subsystem xmlns="urn:jboss:domain:modcluster:1.0"> <mod-cluster-config proxy-list="x.x.x.x:6666" advertise="false"> <dynamic-load-provider> <load-metric type="busyness"/> </dynamic-load-provider> </mod-cluster-config> </subsystem>

for parallel execution of nodes, whether have other configurations...

thanks in advance................

1 - download lastly version of mod_cluster @ this link , extract it.. 2 - configure mod_cluster @ httpd.conf file above..

listen ##put balancer ip here##:80 ############### mod_cluster setting - started ############### <ifmodule ssl_module> sslrandomseed startup builtin sslrandomseed connect builtin </ifmodule> # mod_cluster_adds # adjust hostname , subnet. <ifmodule manager_module> hear ##put balancer ip here##:6666 managerbalancername mycluster <virtualhost ##put machine ip here##:6666> <location /> order deny,allow deny allow 192.168.0 </location> keepalivetimeout 300 maxkeepaliverequests 0 advertisefrequency 5 enablemcpmreceive <location /mod_cluster_manager> sethandler mod_cluster-manager order deny,allow deny allow 192.168.0 </location> </virtualhost> </ifmodule> ############### mod_cluster setting - ended ###############

3 - set each of jboss node's name

<server name="node1" xmlns="urn:jboss:domain:1.2">

4 - add together instance-id attribute in web subsystem shown below in both standalone nodes

<subsystem xmlns="urn:jboss:domain:web:1.1" instance-id="${jboss.node.name}" default-virtual-server="default-host" native="false"> <connector name="http" protocol="http/1.1" scheme="http" socket-binding="http"/> <connector name="ajp" protocol="ajp/1.3" scheme="http" socket-binding="ajp"/> . . . </subsystem>

5 - add together proxy-list in attribute in mod-cluster-config of modcluster subsystem, having ip address , port on apache server (the balancer) running jboss server can communicate it, shown below in both standalone nodes

<subsystem xmlns="urn:jboss:domain:modcluster:1.0"> <mod-cluster-config advertise-socket="modcluster" proxy-list="##put balancer ip here##:80"> . . . </mod-cluster-config> </subsystem>

6 - can go http://balancer_ip:80 , test , manage jboss instances mod_cluster go http://balancer_ip:6666/mod_cluster_manager

**obs: if want run jboss in standalone mode cannot utilize "-b" flag ip 0.0.0.0 listens requests ips.. recommend utilize ip of machine that's running jboss itself

jboss

No comments:

Post a Comment