1) how does the httpd decide which Jboss server to go for next request, because all the three Jboss are advertising themselves to all the three httpd servers ?
By load factor. The server with the most available capacity is chosen. If you have advertizing configured, all JBoss nodes will register with all available HTTPd nodes.
2) If one of my jboss server is having problems (OOM etc) and not gracefully down, will the httpd identify this and future request will not be sent to the impacted jboss server ?
Sure. If the connection becomes broken, the server is marked in error state and no requests are sent to it until it recovers.
Thank you for the reply
Below is my configuration for apache, I assume jboss is advertising to all the three httpd servers
<mod-cluster-config advertise-socket="modcluster" proxy-list="IP_ADD1, IP_ADD2,IP_ADD3">
When you say the loadbalancing factor will select server with the most available capacity is chosen, to test this if I stop one of my jboss for a day and restart then will all the new load will be on this Jboss server till load is equally balanced on all the three servers ?
Also how can I confirm whether the Jboss clustering is working, the same apps\War are deployed on all the three servers.
Thanks and Regards
If you configure proxy-list manually, the automatic discovery will not be used. Automatic discovery uses UDP multicast for discovery.
You typically want to use sticky-sessions if your sessions store some state (e.g. logged in user). Therefore, the load is used for selecting node for the first request, rest are sticky and only stay on one server. In case of that server failure, the session is redirected to different node.
For setup try this document:
Thanks for the information.
I have configured sticky sessions and the configuration is working fine, but now I see another issue. I am monitoring Jboss via visual VM and I can see the threads keep on increasing and lot of these threads are AJP threads on port 8009 (Below is a example)
ajp--IP_ADDRESS-8009-828" - Thread t@1698
at java.lang.Object.wait(Native Method)
- waiting on <5fccfab8> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
Is this a bug, or whether I can fix this with some additional configuration ?