-   Linux - Enterprise (
-   -   LoadBalancing to Jboos (

linux2man 06-24-2008 09:26 AM

LoadBalancing to Jboos
We have 3 servers:- LoadBalncer RHEL.5 Jboos1 Solaris-8.0 Jboos2 Solaris-8.0

We ran Apache on both jboos servers as webservers to serve jboss.
Target is:- Load balance and HA on both Jobss servers via LoadBalncer server.

I tried mod_proxy_balncer but the problem is if jboss down requests still redirected to server because Apache still up.

Any ideas please?

LiamFromLeeds 06-24-2008 09:40 AM

The setup which I've seen to achieve this is a seperate apache server using mod_jk to load balance between the jboss servers. mod_jk looks after detecting that a jboss server is down and redirecting traffic accordingly.

Server A Apache ---mod_jk----> Server B Jboss
---mod_jk-----> Server C Jboss

If you dont want a seperate apache server you could use mod_jk on both your Jboss servers and tell Apache about both your Jboss instamces ie

Server A Apache ---mod_jk----> Server A Jboss
---mod_jk-----> Server B Jboss

Server B Apache --mod_jk-----> Server A Jboss
---mod_jk-----> Server B Jboss

linux2man 06-24-2008 10:05 AM


The setup which I've seen to achieve this is a seperate apache server using mod_jk to load balance between the jboss servers
Thanks for quick reply LiamFromLeeds

Please let me more clarify.

If we will use seperate apache server:-
1- Install mod_jk on this server.
2- this mod_jk module will check health of Jboss and Apache webserver on
both of jboos server.
3- If Jboss OR Apache Down on one of Jboos servers; the module will redirect all requests to second server.

Am I right?

If yes please provide HowTO link to configure mod_jk to do it?

Many thanks again

LiamFromLeeds 06-24-2008 11:58 AM

The standalone Apache replaces the ones on your JBoss servers. You can have multiple Apache's if you want fault tolerance as well ie.
------> Server A Apache ----mod_jk -----> Server C JBoss
/ |
Load Balancer --- ----mod_jk -----> Server D JBoss
------> Server B Apache ----mod_jk -----> Server C JBoss
----mod_jk -----> Server D JBoss

mod_jk only manages traffic from Apache to JBoss (not Apache to Apache). As I said, though, it does detect JBoss faults and will only forward traffic to the working JBoss instances.

This Howto look pretty good ->

LiamFromLeeds 06-24-2008 12:01 PM

My diagram got a bit messed uo in translation, but hopefully you can still make it out.

1) Load balancer balances across two standalone Apache's
2) Apaches load balance across both JBoss's using mod_jk

All times are GMT -5. The time now is 12:37 AM.