LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (http://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   LoadBalancing to Jboos (http://www.linuxquestions.org/questions/linux-enterprise-47/loadbalancing-to-jboos-651283/)

linux2man 06-24-2008 10:26 AM

LoadBalancing to Jboos
 
Hi,
We have 3 servers:-
10.1.10.1 LoadBalncer RHEL.5
10.1.10.2 Jboos1 Solaris-8.0
10.1.10.3 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 10: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.

[HTML]
Server A Apache ---mod_jk----> Server B Jboss
|
---mod_jk-----> Server C Jboss
[/HTML]

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


[HTML]
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
[/HTML]

linux2man 06-24-2008 11:05 AM

Quote:

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 12:58 PM

The standalone Apache replaces the ones on your JBoss servers. You can have multiple Apache's if you want fault tolerance as well ie.
[HTML]
------> 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
[/HTML]

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 -> http://wiki.jboss.org/wiki/UsingMod_jk1.2WithJBoss.

LiamFromLeeds 06-24-2008 01: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:31 PM.