cancel
Showing results for 
Search instead for 
Did you mean: 

Apache load Balancing Question

former_member190982
Active Participant
0 Kudos

Hi Guys,

We have 2 tomcat nodes with BOE installed (say T1 and T2) and I have installed Apache on one server (say A1).

I have have implemented load balancing using mod_jk.Configured everything perfectly.

However I have some doubts, on whether tomcat load balacing is working properly or not.

When I send request to Apache (http://<apache>/BOE/CMC), its always goes to 'T1' server (i know that because in system field its always 'T1'). When I stop T1, apache pass the request to second server i.e T2.

So i am sure that Fail over is working, but how do I test Load Balancing?

As i said when both the Tomcat servers are up, apache always passes request to TOmcat 1 .

Should it not distribute the request between T1 and T2? Hence I am in a bit confusion whether load balancing is working or not.

Thanks,

RVS.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ritesh,

As per general topology rules, the load balancer will always send a request to a member of lowest distance. Only when all of those are broken, it will balance to the members of the next higher configured distance.

For more info, please go through below link:

https://tomcat.apache.org/connectors-doc/generic_howto/loadbalancers.html

In addition to this, I think you are expecting corresponding CMS name should reflect in the system field when request goes through either Tomcat. If you use a BO cluster name instead you can avoid this confusion.

I hope this helps!

Regards,

Mahesh

former_member190982
Active Participant
0 Kudos

Thanks Mahesh,

I wanted to check whether load balancing is working or not, hence I was not using Clustername, and using hostnames instead.

My Idea was that when I send a response through Apache , I would see T1 and T2 in round robin fashion , which was not happening and hence the confusion.

But now its clear , I have understood how it works !

Answers (2)

Answers (2)

former_member190982
Active Participant
0 Kudos

I have an jsp which appends session with the Tomcat name which was used to server the request.

Also learnt that apache has sticky load balancing(not much idea) , it does not follow uniform round robin  .

As mentioned by Dennis, we can check the request using  http://<tomcat>:<port>/manager/status

Regards,

RVS

denis_konovalov
Active Contributor
0 Kudos

sticky or persistent sessions are required for any clustered web app server to work properly with BI4.x.

Pure round-robin on LB in front of tomcats would create huge session issues in BILaunchPad.

denis_konovalov
Active Contributor
0 Kudos

you cannot see in CMC which tomcat is being used.

which system field you mean ?

If failover is working, then load balancing is fine. You can see where sessions go in tomcat build in tools Manager, on main/home page of tomcat you'll see link to it.

former_member190982
Active Participant
0 Kudos

Thanks for replying Denis,

Yeah , I know we cant see in CMC which tomcat was used to server the request.

I was talking about the CMC/BI  login page (system, username, passwd, auth) , I believe the system field is populated by the properties file using cms.default.

So I thought that when the request is sent to tomcat 1 it should show Tomcat 1 (in system filed as I have set cms.default =T1)and if request  goes to Tomcat 2 its should show T2.

Regards,

RVS

denis_konovalov
Active Contributor
0 Kudos

System field on the login page shows CMS name, not Tomcat name and has nothing to do with tomcat load balancing.

At that point BOBJ cluster load balancing will be used and even if you have CMS 1 showed there, it could be CMS 2 that will be handling the session.